• (cs)

    TRWTF is ColdFusion.

  • (cs)

    Cold Fusion Luke Warm DailyWTF

  • (cs)

    "With other bugs and priorities, and a system that generally worked, the initiative lost steam and was all but abandoned."

    Ah, been there, done that, bought the t-shirt, then bought the business that makes the t-shirts and now I sell them to other people that visit...

  • korsuas (unregistered)
    Comment held for moderation.
  • Mike (unregistered)

    So... the WTF is why they don't rip out the conditionals when they encounter them? Or replace the else clauses with something that spits out an error message?

  • (cs)

    Just don't turn off stored procedures.

  • dkf (unregistered) in reply to Mike
    Mike:
    So... the WTF is why they don't rip out the conditionals when they encounter them? Or replace the else clauses with something that spits out an error message?
    No, it's that the new maintainers hack things back to where they were before, but now with an extra layer of crap to make it even more bloated. Spin that a few times and you've got something that's truly Enterprisey!
  • (cs)

    The mistake was to treat changing the code as a big project, which therefore could be canceled. Better to refactor: a sequence of small steps in which each step given an improvement, however small. The duplication step was a big change that gave no immediate benefit. They would have been better to have tackled one query at a a time, changing that one query to used a stored procedure, before moving on to the next.

  • Harry (unregistered)

    TRWTF is select *

  • (cs)

    Yep, because now you've got THREE places to introduce bugs...

    The original query... The copy/pasted duplicate query that is one day to be replaced... The stored procedure, for the small fraction of situations that have them.

  • (cs)

    Awww I guess they missed that chapter of the Progmatic Programmer book that talks about the DRY principle... wah-wah.

    On a side note I had to deal with a system 10x more retarded. Basically it was a Java application which ran jobs which called Oracle Stored Procedures. Now for regular SQL queries there was a table of SQL queries OR a static class which has a bunch of SQL queries. Now some genious decided that the static class is too inefficient and decided to put all those queries into the database...

    Wait for it... Wait for it...

    To execute a SQL query, you had to execute a SQL query to get a SQL query to execute, then execute the SQL query obtained to get the results, often the SQL query obtained called a stored procedure.

    GOOOOO maintainability... On that note most developers could not follow the convoluted path of figuring out where the hell was the SQL query stored (there was at least 10 places completely random) that it was actually easier to put SQL queries hard coded into Struts Action Classes than actually follow the system. No not easier to code, easier to maintain.

    As you would guess, the turnover of the company was 6 months.

  • Anonymous (unregistered)

    Ahh, the dark side of the code.

    Err, false side.

  • ChrisH (unregistered)

    select *

    Straight out of the "Build a web app in 5 minutes" booklet.

  • (cs) in reply to dlikhten
    dlikhten:
    some genious
    Ahh, the irony :)
  • (cs)

    Aside from the obvious condtional WTF, there exist some other core WTFery going on here:

    1. They didn't use <cfqueryparam> in there original queries to prevent SQL injection attacks
    2. When they did decide to use stored procedures they didn't use the <cfstoredproc> tag which, wait for it, is used to call stored procedures.
    3. They prefixed their SQL Server stored procedure names with sp_ which slows down the execution of the stored procedure because SQL Server looks in the master database first for any procedure that starts with sp_

    --The Dan

  • (cs) in reply to DOA
    DOA:
    "With other bugs and priorities, and a system that generally worked, the initiative lost steam and was all but abandoned."

    Ah, been there, done that, bought the t-shirt, then bought the business that makes the t-shirts and now I sell them to other people that visit...

    Usually an initiative like this is driven by one guy, a team lead or manager's pet, who gets management's approval to get it started and require everyone to go along. Then that guy leaves. Management doesn't care about the initiative; they have their management stuff to do. With nobody else championing the initiative, it dies a quiet death by neglect, and its body rots and stinks all over the work we're trying to do.

    I've watched this happen several times during my eight years at the same company. And we who remain are left to try to clean up the mess.

  • (cs) in reply to FredSaw
    FredSaw:
    DOA:
    "With other bugs and priorities, and a system that generally worked, the initiative lost steam and was all but abandoned."

    Ah, been there, done that, bought the t-shirt, then bought the business that makes the t-shirts and now I sell them to other people that visit...

    Usually an initiative like this is driven by one guy, a team lead or manager's pet, who gets management's approval to get it started and require everyone to go along. Then that guy leaves. Management doesn't care about the initiative; they have their management stuff to do. With nobody else championing the initiative, it dies a quiet death by neglect, and its body rots and stinks all over the work we're trying to do.

    I've watched this happen several times during my eight years at the same company. And we who remain are left to try to clean up the mess.

    If your mess looks like this one, you should step yourself up to championing it, it needs done already!

  • cod3_complete (unregistered)

    Huge WTF here: 'To avoid breaking existing functionality, all of the original code was left in. If a stored procedure existed to handle an existing query, they'd have a configurable switch to toggle stored procedures or hard-coded SQL. Someone created and ran a script to duplicate the queries for this change:'

    Why not just create a flag in the production coldfusion script that writes out which hard coded queries are still being run into a log file? Then replace the active ones and remove duplicates and inactive ones.Good ole pragamatic programmers(those who've read the book) would call this the tracer bullet technique. Oh well glad I don't have to maintain that crap.

  • (cs)

    TRWTF is that they were using stored procedures for simple select's.

  • (cs)

    This is a classic example of a good idea gone horribly wrong because they didn't think it through.

    Good idea: Realizing that your existing solution doesn't scale well.

    Really good idea: understanding that small, incremental changes are better than taking the whole thing offline and messing with hundreds of queries at once.

    Ridiculously bad idea: Introducing this whole switching mechanism. Seriously, WTF. Why didn't they just, I don't know, replace the existing queries with stored procs as they were written? Isn't that the best way to preserve backwards compatibility?

    Ugh. Anyway, I think the best solution was already mentioned, but it might have been a comment the first time this guy was posted a few months ago. Just renamed the boolean "storedProcs" to "shouldWork" and you're all set.

  • (cs) in reply to NaN
    NaN:
    If your mess looks like this one, you should step yourself up to championing it, it needs done already!
    What generally happens is a few months go by with nobody saying anything, and then one day someone (often me) will get tired of having to deal with the annoyance and bring it up at a team meeting, where it's finally revealed that no one is doing anything about the initiative any more and it's dead in the water. At this point someone (often me) will suggest that since we're not using it any more, we get rid of it. All will be in agreement on this with the possible exception of the guy who is always driven to play devil's advocate, so we'll devote about 10 minutes to arguing him down and then we'll agree that we need to get rid of it. And that will be all for that meeting.

    A couple of weeks later the subject will come up again and we'll agree that in order to get rid of it we have to have a plan and someone has to take ownership. And we'll all slough it off on George, the guy who handles everything because A) he's so good at it and B) he never learned how to say "no". So George will spend the next two or three weeks getting rid of the remains of the initiative, and once again birds will sing and sun will shine and flowers will bloom, until another manager's pet comes up with another bad idea.

  • Martin (unregistered)

    Cold Fusion? It's the biggest WTF itself!

    It's probably used only in America, I've never seen it in Europe in production.

  • (cs) in reply to Martin
    Martin:
    Cold Fusion? It's the biggest WTF itself!

    It's probably used only in America, I've never seen it in Europe in production.

    Exactly. They should've used .NET with DALs... oh wait then they couldn't use stored procedures at all because they're not portable. Oh wait, .NET is not portable, CF is.

    But wtf do I know, I'm a high school dropout.

  • (cs) in reply to Martin
    Martin:
    Cold Fusion? It's the biggest WTF itself!

    It's probably used only in America, I've never seen it in Europe in production.

    Coz the world consists entirely of America and Europe...
  • (cs) in reply to MasterPIanSoftware
    MasterPIanSoftware:
    Martin:
    Cold Fusion? It's the biggest WTF itself!

    It's probably used only in America, I've never seen it in Europe in production.

    Exactly. They should've used .NET with DALs... oh wait then they couldn't use stored procedures at all because they're not portable. Oh wait, .NET is not portable, CF is.

    But wtf do I know, I'm a high school dropout.

    .NET is portable too... You can run it on Windows 2003 and Windows 2008. That's of course if you don't use the core edition. You can also run it on Vista. .NET is super cross platform. I mean you can run it in MONO!!!

  • (cs) in reply to KenVV
    KenVV:
    MasterPIanSoftware:
    Martin:
    Cold Fusion? It's the biggest WTF itself!

    It's probably used only in America, I've never seen it in Europe in production.

    Exactly. They should've used .NET with DALs... oh wait then they couldn't use stored procedures at all because they're not portable. Oh wait, .NET is not portable, CF is.

    But wtf do I know, I'm a high school dropout.

    .NET is portable too... You can run it on Windows 2003 and Windows 2008. That's of course if you don't use the core edition. You can also run it on Vista. .NET is super cross platform. I mean you can run it in MONO!!!

    You guys are both retarded. They should've used RoR. RoR magically writes the queries for you, so you don't have anything to worry about.

  • (cs)

    I think TRWTF is that a woman coder is the basis of this story.

    P.S. Hey Lindsay L do you live in the Chicago area? ;)

  • (cs) in reply to pstorer
    pstorer:
    KenVV:
    MasterPIanSoftware:
    Martin:
    Cold Fusion? It's the biggest WTF itself!

    It's probably used only in America, I've never seen it in Europe in production.

    Exactly. They should've used .NET with DALs... oh wait then they couldn't use stored procedures at all because they're not portable. Oh wait, .NET is not portable, CF is.

    But wtf do I know, I'm a high school dropout.

    .NET is portable too... You can run it on Windows 2003 and Windows 2008. That's of course if you don't use the core edition. You can also run it on Vista. .NET is super cross platform. I mean you can run it in MONO!!!

    You guys are both retarded. They should've used RoR. RoR magically writes the queries for you, so you don't have anything to worry about.

    I'm not your guy, friend!

  • (cs) in reply to MasterPIanSoftware
    MasterPIanSoftware:
    pstorer:
    KenVV:
    MasterPIanSoftware:
    Martin:
    Cold Fusion? It's the biggest WTF itself!

    It's probably used only in America, I've never seen it in Europe in production.

    Exactly. They should've used .NET with DALs... oh wait then they couldn't use stored procedures at all because they're not portable. Oh wait, .NET is not portable, CF is.

    But wtf do I know, I'm a high school dropout.

    .NET is portable too... You can run it on Windows 2003 and Windows 2008. That's of course if you don't use the core edition. You can also run it on Vista. .NET is super cross platform. I mean you can run it in MONO!!!

    You guys are both retarded. They should've used RoR. RoR magically writes the queries for you, so you don't have anything to worry about.

    I'm not your guy, friend!

    He's not your friend, buddy!

  • SomeCoder (unregistered) in reply to MasterPIanSoftware
    MasterPIanSoftware:
    Martin:
    Cold Fusion? It's the biggest WTF itself!

    It's probably used only in America, I've never seen it in Europe in production.

    Exactly. They should've used .NET with DALs... oh wait then they couldn't use stored procedures at all because they're not portable. Oh wait, .NET is not portable, CF is.

    But wtf do I know, I'm a high school dropout.

    I'm all for portability (in fact, I try to strive for it) but how often do you really care about portability for a web app? It runs on your server and that's it. You control what gets loaded on your server.

    Besides, if you really want portability, why not use PHP? Yes, lots of WTFs can be written in PHP but if you aren't a moron, you can avoid those pitfalls.

  • (cs) in reply to KenVV
    KenVV:
    MasterPIanSoftware:
    pstorer:
    KenVV:
    MasterPIanSoftware:
    Martin:
    Cold Fusion? It's the biggest WTF itself!

    It's probably used only in America, I've never seen it in Europe in production.

    Exactly. They should've used .NET with DALs... oh wait then they couldn't use stored procedures at all because they're not portable. Oh wait, .NET is not portable, CF is.

    But wtf do I know, I'm a high school dropout.

    .NET is portable too... You can run it on Windows 2003 and Windows 2008. That's of course if you don't use the core edition. You can also run it on Vista. .NET is super cross platform. I mean you can run it in MONO!!!

    You guys are both retarded. They should've used RoR. RoR magically writes the queries for you, so you don't have anything to worry about.

    I'm not your guy, friend!

    He's not your friend, buddy!

    I'm not your buddy, guy!

  • Matthew (unregistered) in reply to ChrisH
    ChrisH:
    select *

    Straight out of the "Build a web app in 5 minutes" booklet.

    Oh who cares? If your tables are normalized in the first place, select * shouldn't be a big deal. If you need 8 out of 10 columns, it is just a waste of time typing each one out in the select query.

  • Russ (unregistered) in reply to SomeCoder
    SomeCoder:
    MasterPIanSoftware:
    Martin:
    Cold Fusion? It's the biggest WTF itself!

    It's probably used only in America, I've never seen it in Europe in production.

    Exactly. They should've used .NET with DALs... oh wait then they couldn't use stored procedures at all because they're not portable. Oh wait, .NET is not portable, CF is.

    But wtf do I know, I'm a high school dropout.

    I'm all for portability (in fact, I try to strive for it) but how often do you really care about portability for a web app? It runs on your server and that's it. You control what gets loaded on your server.

    Besides, if you really want portability, why not use PHP? Yes, lots of WTFs can be written in PHP but if you aren't a moron, you can avoid those pitfalls.

    You might want to be portable in case, I dunno - MS decides to charge you out the wazoo for licensing and you decide to switch from Windows and MS SQL to Linux and MySQL. MySQL does have a conversion utility, but you still have to do a lot of manual work, and my guess is that you'll have to modify quite a lot of code to run well under Mono.

    PHP is cross platform, but I wouldn't be caught dead running it on windows. It's insecure enough on Linux on which it comes preinstalled most of the time. Why would you ever run it on windows?

  • (cs) in reply to FredSaw
    FredSaw:
    What generally happens is a few months go by with nobody saying anything, and then one day someone (often me) will get tired of having to deal with the annoyance and bring it up at a team meeting, where it's finally revealed that no one is doing anything about the initiative any more and it's dead in the water. At this point someone (often me) will suggest that since we're not using it any more, we get rid of it. All will be in agreement on this with the possible exception of the guy who is always driven to play devil's advocate, so we'll devote about 10 minutes to arguing him down and then we'll agree that we need to get rid of it. And that will be all for that meeting.

    A couple of weeks later the subject will come up again and we'll agree that in order to get rid of it we have to have a plan and someone has to take ownership. And we'll all slough it off on George, the guy who handles everything because A) he's so good at it and B) he never learned how to say "no". So George will spend the next two or three weeks getting rid of the remains of the initiative, and once again birds will sing and sun will shine and flowers will bloom, until another manager's pet comes up with another bad idea.

    Wow. You just described a typical meeting of the board of directors of the non-profit organization that I volunteer with. Nice to know that it's not confined to IT.

    Except, apparently my name is George... sigh.

  • Russ (unregistered) in reply to Matthew
    Matthew:
    ChrisH:
    select *

    Straight out of the "Build a web app in 5 minutes" booklet.

    Oh who cares? If your tables are normalized in the first place, select * shouldn't be a big deal. If you need 8 out of 10 columns, it is just a waste of time typing each one out in the select query.

    Oh, I don't know, maybe you have some text columns in there? That would cause some issues.

    Also I don't think CF deals with with select * when you add and modify the columns and the connection pooling is on. Something about caching the schema in the driver..

  • Matthew (unregistered) in reply to SomeCoder
    SomeCoder:
    Besides, if you really want portability, why not use PHP? Yes, lots of WTFs can be written in PHP but if you aren't a moron, you can avoid those pitfalls.

    Like Good, PHP can never win, because PHP is dumb.

    Seriously, PHP is just a braindead, boring language with a hacked together object system and a flat, inconsistent function namespace that would baby Jesus cry. What's particularly funny about PHP is that in in many PHP frameworks, they've invented a templating language: Smarty. PHP is a templating language. Apparently even programmers don't think PHP is good enough to do what it was designed to for. A templating language written in a templating language, WTF?

  • SomeCoder (unregistered) in reply to Russ
    Russ:

    You might want to be portable in case, I dunno - MS decides to charge you out the wazoo for licensing and you decide to switch from Windows and MS SQL to Linux and MySQL. MySQL does have a conversion utility, but you still have to do a lot of manual work, and my guess is that you'll have to modify quite a lot of code to run well under Mono.

    PHP is cross platform, but I wouldn't be caught dead running it on windows. It's insecure enough on Linux on which it comes preinstalled most of the time. Why would you ever run it on windows?

    I don't see what the huge difference between running PHP/Apache on Windows and running it on Unix is (except for the glaring obvious differences are with the platforms).

    Running PHP on IIS... well I've done it, yes, but you're right, I wouldn't recommend it. Just get Apache going (takes like 5 minutes or less) and use that.

    As for converting between MS SQL and MySQL - I've done it. It's not THAT hard.

    The main point is, portability is usually less important with web apps. And if you start them out correctly, it's a non-issue anyway.

  • accident (unregistered)

    Isn't this story a dupe? I clearly remember reading this exact one before a couple months back.

  • SomeCoder (unregistered) in reply to Matthew
    Matthew:
    SomeCoder:
    Besides, if you really want portability, why not use PHP? Yes, lots of WTFs can be written in PHP but if you aren't a moron, you can avoid those pitfalls.

    Like Good, PHP can never win, because PHP is dumb.

    Seriously, PHP is just a braindead, boring language with a hacked together object system and a flat, inconsistent function namespace that would baby Jesus cry. What's particularly funny about PHP is that in in many PHP frameworks, they've invented a templating language: Smarty. PHP is a templating language. Apparently even programmers don't think PHP is good enough to do what it was designed to for. A templating language written in a templating language, WTF?

    Arg, not another PHP flame war! :)

    Actually, I mostly agree with you. PHP isn't suitable as a templating language. I don't think calling it that is exactly correct though. I think it's fine to use as a back-end but using it for display logic (which is how it's used a lot of the time) can end up being pretty bad.

    PHP has a lot of weaknesses but I'd rather use something lightweight and fast than all of the bloated, slow frameworks that are floating around out there.

  • 008 (unregistered) in reply to pstorer
    pstorer:
    KenVV:
    MasterPIanSoftware:
    pstorer:
    KenVV:
    MasterPIanSoftware:
    Martin:
    Cold Fusion? It's the biggest WTF itself!

    It's probably used only in America, I've never seen it in Europe in production.

    Exactly. They should've used .NET with DALs... oh wait then they couldn't use stored procedures at all because they're not portable. Oh wait, .NET is not portable, CF is.

    But wtf do I know, I'm a high school dropout.

    .NET is portable too... You can run it on Windows 2003 and Windows 2008. That's of course if you don't use the core edition. You can also run it on Vista. .NET is super cross platform. I mean you can run it in MONO!!!

    You guys are both retarded. They should've used RoR. RoR magically writes the queries for you, so you don't have anything to worry about.

    I'm not your guy, friend!

    He's not your friend, buddy!

    I'm not your buddy, guy!

    He's not your guy, friend!

    CAPTCHA: plaga (-rism?)

  • Russ (unregistered) in reply to SomeCoder
    SomeCoder:
    Russ:

    You might want to be portable in case, I dunno - MS decides to charge you out the wazoo for licensing and you decide to switch from Windows and MS SQL to Linux and MySQL. MySQL does have a conversion utility, but you still have to do a lot of manual work, and my guess is that you'll have to modify quite a lot of code to run well under Mono.

    PHP is cross platform, but I wouldn't be caught dead running it on windows. It's insecure enough on Linux on which it comes preinstalled most of the time. Why would you ever run it on windows?

    I don't see what the huge difference between running PHP/Apache on Windows and running it on Unix is (except for the glaring obvious differences are with the platforms).

    Running PHP on IIS... well I've done it, yes, but you're right, I wouldn't recommend it. Just get Apache going (takes like 5 minutes or less) and use that.

    As for converting between MS SQL and MySQL - I've done it. It's not THAT hard.

    The main point is, portability is usually less important with web apps. And if you start them out correctly, it's a non-issue anyway.

    MySQL seems to be a wtf in itself. They STILL don't support functions as defaults for the tables. WTF. That's like the most retarded thing I've ever heard. How hard is it to implement that? All other RDBMs do it. It was requested at least 3 years ago.

    Wish PostgreSQL had a conversion utility from MS SQL. Anyone know of one?

  • (cs) in reply to korsuas
    korsuas:
    see this already posted in a comment in February. http://thedailywtf.com/Comments/SQL-Sentences.aspx?pg=2

    I see dead reposts.

    From the same post you linked to:

    Outlaw Programmer:
    Holy moly. You should definitely submit this story as it deserves more attention.

    Obviously, Licky Lindsay (the original poster) decided to follow the advice given. What's the problem?

  • Alfred (unregistered)

    I've seen a lot of places where there is new functionality, or alternate functionality, introduced, but the old is kept around "just in case". Universally, there is some switch to go back to using the old code.

    Problems this causes: *Some parts of the application are using one version, some use the other version. hence, two versions to maintain simultaneously. *If nobody uses the old version, it sits there and rots. It gets in the way of maintaining working code, and makes people unsure about what is used and what isn't. *The worst part: Sometimes, for complicated business or political reasons, the new code wasn't turned on. The test plan was usually something like "make sure the inactive functionality doesn't change the active functionality" and it was moved into production. The drawback of this is that the actual functionality from the turned on state is never tested, and then it sits there for a year or so while changes in the rest of code base break it because nobody could test their changes against the functionality.

  • (cs) in reply to FredSaw

    Except, when you get rid of the application, the one user that actually benifitted from the program's alpha/beta version steps up and said, "Why did this stop working?! Holy hell! I can't get any work done!?" At least that's what always happens to me.

    I've inherited a handful of applications from a dude who spent his entire tenure at our company putting three medium sized applications together. (Thankfully, only two made it to production.) And by putting them together, I mean he actually placed them in the same application.

    He originally programmed in java, moved to asp, but kept writing everything in javascript (<%@language=JScript%>), then moved to C#, but never figured out the page life-cycle/viewstate, and then moved to VB.NET. And somehow all are duct-taped together in one big application. It's actually pretty amazing. The "helpers" folders for the java applications alone is a sight to behold (zztSQLConnection, zvtASQLConnection, zztDBConnection, etc). It calls Web services, windows services, digs hap-hazardly through active directory, and at one point he tried to put it into sharepoint. Thank god he didn't make it. He has layers upon layers of abstraction that do nothing but call another method in another class in a single line; sometimes you have to go through ten layers of a single line calling another method to figure out what one call does. And a handful of people still use the programs so getting rid of them is out of the question. Guess who has to maintain them. Well, most of the time I do, but he's actually made money from us by doing contract work on his programs.

    Hmm... that's not a bad idea.

  • (cs) in reply to MasterPIanSoftware
    MasterPIanSoftware:
    Exactly. They should've used .NET with DALs... oh wait then they couldn't use stored procedures at all because they're not portable. Oh wait, .NET is not portable, CF is.

    But wtf do I know, I'm a high school dropout.

    Yep. An unskilled high school dropout who is a failure even as a script kiddie and likes to post annoying drivel while emulating a close copy of someone else's name. But never fear, russ0519/JimBastard/whoever else you're posting as today - we know who you are.

    And for others: http://forums.thedailywtf.com/forums/t/8315.aspx?PageIndex=1

    Also the one posting trying to pretend to be me (KenVV)and bstorer (pstorer). Loser.

    BTW, you should know that russ0519 tries to get even with people who don't like his drivel; he tries to sign them up with spam sites. However, he's so stupid and untalented that he does it from his OWN job's IP address (vscript.com) - vscript has the distinction of being the designer of Eliot Spitzer's web site (badly) in CF.

  • (cs) in reply to KenW
    KenW:
    MasterPIanSoftware:
    Exactly. They should've used .NET with DALs... oh wait then they couldn't use stored procedures at all because they're not portable. Oh wait, .NET is not portable, CF is.

    But wtf do I know, I'm a high school dropout.

    Yep. An unskilled high school dropout who is a failure even as a script kiddie and likes to post annoying drivel while emulating a close copy of someone else's name. But never fear, russ0519/JimBastard/whoever else you're posting as today - we know who you are.

    And for others: http://forums.thedailywtf.com/forums/t/8315.aspx?PageIndex=1

    Also the one posting trying to pretend to be me (KenVV)and bstorer (pstorer). Loser.

    BTW, you should know that russ0519 tries to get even with people who don't like his drivel; he tries to sign them up with spam sites. However, he's so stupid and untalented that he does it from his OWN job's IP address (vscript.com) - vscript has the distinction of being the designer of Eliot Spitzer's web site (badly) in CF.

    Yea you tell them, MasterPlanSoftware, KenW, pstorer and probably a bunch of other sock puppets on here.

    BTW not everyone here works from their mother's appartment, KenW.

  • (cs) in reply to Matthew
    Matthew:
    Oh who cares? If your tables are normalized in the first place, select * shouldn't be a big deal. If you need 8 out of 10 columns, it is just a waste of time typing each one out in the select query.

    And what happens when you have SELECT * all over your codebase, and over the next year your needs grow and your 10 column table is now 100 columns (a dozen of which are text or large varchar), but you're still only needing the 8?

    Being lazy now because "it is just a waste of time typing each one out in the select query" almost always ends up costing you in the long haul, whether it's by choking bandwidth pulling the extra data across your network or by taking up a lot of your time going back and fixing what you should have done right in the first place. Being lazy like that means you're not doing a good job.

  • (cs) in reply to MasterPIanSoftware
    MasterPIanSoftware:
    BTW not everyone here works from their mother's appartment, KenW.

    Awww. I wasn't going to tell anyone your secret, but you've let it slip. I guess it won't hurt now to tell everyone you share her bed as well, will it?

  • (cs) in reply to Matthew
    Matthew:
    Like Good, PHP can never win, because PHP is dumb.

    Seriously, PHP is just a braindead, boring language with a hacked together object system and a flat, inconsistent function namespace that would baby Jesus cry. What's particularly funny about PHP is that in in many PHP frameworks, they've invented a templating language: Smarty. PHP is a templating language. Apparently even programmers don't think PHP is good enough to do what it was designed to for. A templating language written in a templating language, WTF?

    Boy, you just insist on letting people here know what a lack of skills you have, don't you?

    PHP is not a "templating language". It's a scripting language. They're not the same thing.

    If you have no clue what you're talking about (as is the case in both posts you've contributed to this thread so far), at least don't embarrass yourself by posting and letting everyone see your ignorance.

    Of course, I suppose VB is your idea of a powerful language, right?

  • (cs) in reply to Matthew
    Matthew:
    ChrisH:
    select *

    Straight out of the "Build a web app in 5 minutes" booklet.

    Oh who cares? If your tables are normalized in the first place, select * shouldn't be a big deal. If you need 8 out of 10 columns, it is just a waste of time typing each one out in the select query.

    I used to wonder if people like you posted idiotic comments on here to be funny or whether they truly are idiots. Considering the amount of WTFuckery I've seen, I'm now inclined to think you are genuinely an idiot. "SELECT *" is stupid. What happens when someone modifies the schema and inserts a column between the existing ones? Something like "ALTER TABLE foo ADD COLUMN bar INTEGER AFTER COLUMN baz"?

Leave a comment on “The Stored Procedure Solution”

Log In or post as a guest

Replying to comment #:

« Return to Article