• J (unregistered) in reply to devjoe
    devjoe:
    I love how he replaces <client> twice. Just in case the client name contains <client> so they can replace it again.

    Not to mention the fact that row["clientname"] is used for <sessionid> as well. So if row["clientname"] contains "My favorite <client> name!" you can get a file name like this:

    "My favorite My favorite My favorite <client> name! name! name! My favorite My favorite <client> name! name! 09 10 1998.XLSX"

  • C-Derb (unregistered) in reply to ammoQ
    ammoQ:
    It's not that uncommon for an experienced developer to stick to the feature subset of an old version of a language, since that is what he originally learned and where he got his experience, and it "works for him".
    First, let me be a little pedantic: String.Format() existed in .Net 1.1, while String.Replace() and String.PadLeft() didn't exist until 2.0. (Unless I'm misunderstanding MSDN. Maybe I'm wrong.)

    What bothers me about this code isn't that this guy may or may not know about "newer" features like String.Format() or StringBuilder. The guy is clearly familiar with string concatenation as evidenced by the line that replaces <sessiondate>, so why not just use concatenation in the first place? Why is he doing a replace on a string format he defined?

    Of course, that's a rhetorical question, because his code clearly shows that he's a crappy programmer, and this is the code a crappy programmer writes.

  • faoileag (unregistered) in reply to Ozz
    Ozz:
    As someone who lived in the U.K. and suffered the British National Health Service (which Obama has stated he admires and wants ObamaCare to emulate) for over 30 years, I think I qualify. You do not want it. Trust me on this.
    Bad experience may cloud one's opinion, true enough (my experience with the NHS, although sporadic, has so far been pretty good), but you should perhaps consider one thing re health care in the US: a healthcare system that is available to all my have ample room for improvements, but it is probably still better than no healthcare at all. The well-to-do don't need Obamacare and more often than not go private in the UK as well. The poor, however, might be rather happy if someone provides affordable healthcare.
  • David Mårtensson (unregistered) in reply to C-Derb
    C-Derb:
    Why is he doing a replace on a string format he defined?

    Well, this code might very well have been migrated from older languages and the string to replace might have been located in resources at some time.

    And when migrating old code you many times do not try to rewrite it all to new specs but just enough to get everything to work, thinking that you can fix it up later (which never happens of cause ...)

  • My name indeed (unregistered) in reply to darkmattar
    darkmattar:
    String comment = "<whatnumber>"; comment.replace("<whatnumber>","frist"); ACA (obamacare for the rightwingers) experience.
    What if I am not right-wing but also know that "affrodable" it isn't?
  • Z (unregistered) in reply to My name indeed
    My name indeed:
    darkmattar:
    String comment = "<whatnumber>"; comment.replace("<whatnumber>","frist"); ACA (obamacare for the rightwingers) experience.
    What if I am not right-wing but also know that "affrodable" it isn't?

    You're right. A small hobbit is not going to be able to destroy it simply by throwing the One Ring into Mount Doom this time.

  • ztrem (unregistered) in reply to darkmattar
    darkmattar:
    String comment = "<whatnumber>"; comment.replace("<whatnumber>","frist");

    HR is the reason for all the resume stupidity. There is an equally asinine resume requirement for practically every job out there. I would not be shocked if HR even required new HR hires to have 5 years ACA (obamacare for the rightwingers) experience.

    I can see a HR person not knowing when C# was invented (although someone with knowledge should actually be LOOKING at what HR is putting out there.) But I've seen places that required 5 years experience with Visual Studio 2010, and that was a year ago. You'd think they'd notice that something is wrong with that.

  • Onyxia (unregistered) in reply to Valued Service
    Valued Service:
    Jasper:
    Ok, this is not the most elegant way of formatting strings, but this is a bit... meh. Not a spectacular failure because of some spectacularly bad code.

    curious.... perversions.... in information technology....

    four dots.... four... dots....

    MORE DOTS!

  • Anon (unregistered) in reply to Ozz
    Ozz:
    darkmattar:
    String comment = "<whatnumber>"; comment.replace("<whatnumber>","frist");

    HR is the reason for all the resume stupidity. There is an equally asinine resume requirement for practically every job out there. I would not be shocked if HR even required new HR hires to have 5 years ACA (obamacare for the rightwingers) experience.

    As someone who lived in the U.K. and suffered the British National Health Service (which Obama has stated he admires and wants ObamaCare to emulate) for over 30 years, I think I qualify.
    You do not want it. Trust me on this.

    Guess you got stuck on a waiting list to have your head removed from your Ass. The NHS and ACA have npthing in common. They couldn't be more different.

  • Mr. Underqualified (unregistered) in reply to I like to repeat the point aswell
    I like to repeat the point aswell:
    Ryan V:
    TRWTF is how he had 15 years of experience in a language that's only 13 years old...

    No... TRWTF is how he had 15 years of experience in a language that's only 13 years old...

    Once upon a time I was looking for a web development job and I was interviewed for a place that was looking for someone with 5 years experience in a web technology (I forget which one it was) that had only been around 2 years. I didn't get the job, I guess they thought I was too under-qualified with only 2 years experience in it....

  • ThePoor (unregistered) in reply to faoileag

    I'm one of "the poor" and I do NOT want his Healthcare junk!

  • Andrew Au (unregistered) in reply to Ryan V
    Ryan V:
    TRWTF is how he had 15 years of experience in a language that's only 13 years old...

    How do I make it a featured comment?

  • Captain troll (unregistered)

    You fools. The proud C# developer has 15 mercurian years of experience, not 15 years of 365.25 days each.

  • (cs) in reply to Mickey
    Mickey:
    Of course this is a front page WTF. This developer has 15 years of experience! This is excusable for a new developer, somebody in college, or in their first couple of years in the industry. Even so, TRWTF is that this wasn't caught in a code review.

    When you don't have CMM level certification, code review is in non-existence.

  • (cs) in reply to Ryan V
    Ryan V:
    TRWTF is how he had 15 years of experience in a language that's only 13 years old...
    Maybe working in similar languages.
  • Captain troll (unregistered)

    code review is blasphemy to rockstar senior programmers

  • Braindead (unregistered)

    After reading this code, my brain feels weird. Does that happen a lot around here?

  • Captain troll (unregistered) in reply to Braindead

    I thought your brain was dead, bro. Besides all that, the C# dude did not misuse regular expressions. I fear he is not senior enough, at least not in a level comparable to Nagesh.

  • Anomaly (unregistered)

    I love how every says he replaces client twice, when he never replaces sessionid at all either. Unless TRWTF is using the client name as the sessionid.

    Surely it should be str = str.Replace("<sessionid>", row["sessionid"].ToString());

    not str = str.Replace("<sessionid>",row "clientname"].ToString());

  • (cs) in reply to Captain troll
    Captain troll:
    code review is blasphemy to rockstar senior programmers

    Bollocks! Rockstar senior programmers can't wait to get a whole team of worshippers to read every byte of their limpidly lucid effulgence.

  • Sus (unregistered) in reply to faoileag
    faoileag:
    RandomGuy:
    However, I assume the code dates back to before the year 1000, otherwise I find no logical explanation for this:
    time.Year.ToString().PadLeft(4, '0'))
    Well, Japan is currently in Heisei 25, which, assuming the cultural setting of the machine is on a japanese calendar, would get you "0025" from time.Year.ToString().PadLeft(4, '0').
    Except 0025 is actually 21.
  • Norman Diamond (unregistered) in reply to faoileag
    faoileag:
    RandomGuy:
    However, I assume the code dates back to before the year 1000, otherwise I find no logical explanation for this:
    time.Year.ToString().PadLeft(4, '0'))
    Well, Japan is currently in Heisei 25, which, assuming the cultural setting of the machine is on a japanese calendar, would get you "0025" from time.Year.ToString().PadLeft(4, '0').
    No one puts leading zeroes on imperial year numbers.
  • Norman Diamond (unregistered)
    Remy Porter:
    I once helped someone tweak their resume. They were applying for a position that required 5 years of Windows 2008 experience- in 2010.
    I would have qualified. My first BSOD in a Longhorn beta took place in 2005.
  • Mick (unregistered) in reply to merb
    merb:
    Besides that C# appeared in 2000 and someone therefore cannot have "15 years of experience developing in C#"
    The article suggests the Senior Developer's resume claimed this - it never suggests it was an accurate (or even realistic) claim
    merb:
    XLSX extensions weren't born before 2007. This code is at max a little over 6.5 years old. Something tells me this story is made up...
    The code in question was presumably not written when he first started his 15 years of experience (in fact was most likely written relatively recently relative to the story - so it could easily be newer than 6 years).

    (Apologies to the other people who presumably said the same thing - I'm not going to read all the comments just to make sure and then come back to this....)

    Just sayin....

  • Yuri (unregistered) in reply to caffiend
    caffiend:
    Y'know, this is such a sad realization, but code injection attacks will be with us for the remainder of the information age. In this example, with user supplied strings, that whole cascading replace thing could let a malicious user do whatever they wanted to the resultant data. Without getting too pedantic about the exact semantics of an attack, it's this kind of thoughtless design that creates these attack vectors, and it'll never stop. Parametrized queries are a good solution to SQL injection, yet the PHP / MySQL people are still persisting with this MySQLReallyGoodEscapeStringV2ThisOneReallyWorksIPromise() bullshit. There are a few strategies to mitigate CSS attacks, but they need to be followed meticulously and to the letter in order to work comprehensively.

    Honestly, this guy may have invented a new malware vector without even thinking about it. But how many devs are there in the world doing exactly that, every day. Damn it, I'm gonna resign and move to Russia, drink vodka and steal all your internetz, easier than trying to stop it.

    At least we've finally gotten close to the funeral of the buffer overflow exploit. Kids don't even know how to code C any more.

    And you know what that means for all us dinosaurs who can play C.... Cha Ching, the money train is about to roll in....

  • asdfg (unregistered) in reply to sunnyboy
    sunnyboy:
    Regarding stated experience, I have found the following to be true more times than it is untrue:

    X years experience usually really means...

    ONE year experience, repeated X times.

    No, X years Experience usually means soemthing like: - X different jobs all lasting over 6 months - 2X different jobs, often lasting a couple of months each - (X - y) years of working with some techonolgy, where y is the rounding factor

    IMHO the problem is that recruiters/employers think years experience is important...And remember the employer wants a better candidate than they'll get, and an employee wants a better job than they qualify for so:

    • 3 yrs experience required = 1 year experience, entry level if you;re lucky and awesome enough (or more simply green but competent)
    • 5 yrs experience = 3 years experience (or more simply mildly seasoned and probably getting quite knowledgabel)
    • 10 yrs experience = 5+ years experience (or more simply - you've been doing it a while, whould probably know your shit and are hopefully {at least within your workplace} recognised as some sort of authority on the subject)
    • 15 years experience = we are an equal opportunities employer willing to hire people over 30 (ok TIC [maybe 50], but this would imply to me that they are keen to hire someone older)

    One of the big problems in IT is that long term experience can be a bad thing - Technology moved on, and this guy didn't....while it could be that it's because he loves the old technology, or is the only person who understands it it's more likely that he's incapable of self-development....

    Finally (before this gets too long) I think a lot of hirers/employers (in some respects I think that many employees/candidates don't either) don't really know what experience means - although it might be that they're trying to account for the fact that Jimmy will count his secondary school years where he was making footy tip programs at home...I would imagine most people peak in less than 3 years on a particular technology (they never know everything, but they increasingly know where/how to look for the bits they need that they don't yet know). Beyond that, they either plateau (because they realise they don't need to know absolutely everything) or fall aways (because they stop keeping up with advancements in new releases). One of the problems with Humans is that we're sentimental fools. I think it's inherent in our nature that we don't really believe a new way to do something is better....sure it might be quicker, less risky or more self-explanatory using this new-fangled way, but before you pups (who by the way don't understand the first thing about this technology) had this oversimplified mechanism created we used to do it differently - because we actually knew what we were doing...

    Now get off my lawn!

  • Jim (unregistered) in reply to ztrem
    ztrem:
    darkmattar:
    String comment = "<whatnumber>"; comment.replace("<whatnumber>","frist");

    HR is the reason for all the resume stupidity. There is an equally asinine resume requirement for practically every job out there. I would not be shocked if HR even required new HR hires to have 5 years ACA (obamacare for the rightwingers) experience.

    I can see a HR person not knowing when C# was invented (although someone with knowledge should actually be LOOKING at what HR is putting out there.) But I've seen places that required 5 years experience with Visual Studio 2010, and that was a year ago. You'd think they'd notice that something is wrong with that.

    Why? If they already use a whole host of programs that came out (often the year) before their title would imply....the real geeks might be using stuff that was written in 2008 but called 2010....it's feasible....(also. I'd imagine someone who worked on VS2010 itself would have a reasonable claim to 5 years experience in it....)

  • Surendaar (unregistered) in reply to Nagesh
    Nagesh:
    Mickey:
    Of course this is a front page WTF. This developer has 15 years of experience! This is excusable for a new developer, somebody in college, or in their first couple of years in the industry. Even so, TRWTF is that this wasn't caught in a code review.

    When you don't have CMM level certification, code review is in non-existence.

    Actually, that's remarkably true. The only places I've worked where Code Reviews were anything more than convincing some other (often less qualified dev) that you're awesome and your stuff always works was in CMM shops....

  • Sebastian Ramadan (unregistered)

    In the IT industry, one should be aware that changes occur and improvements are constantly made, no matter what rank, "seniority" or otherwise. I see this error quite a lot in professors, too.

    The real wtf here is that the author hasn't recognised that brains degrade naturally with age, and that he is probably doomed to the same fate. Hopefully he will choose the path of humility and forego the title of "seniority", to prove to his peers that he's not interested in discriminating by age.

    Before I get lotsa "this butt-hurt, old man" comments, I'm twenty-five. I've worked along-side "seniors" (people who have served in the army, ex-teachers, programmers). They may be a bit hazy at times, but they have some interesting stories to tell, interesting lessons to teach and interesting ideas to share. If you're not willing to learn, then you're probably too arrogant to write software.

    Lets learn from the past, and not repeat the mistake that is this article...

    CAPTCHA: augue. I like to augue, in case you haven't noticed.

  • CaptainTroll (unregistered) in reply to Sebastian Ramadan

    I also like to augue. There are seniors and seniors You can always learn from them anyway: from one kind you learn how to do things correctly, from the other your learn that you should not do what they do:

    public static final int TWENTY_ONE = 21; //what the heck is this magic number?

    ... someVar = blah(); //someVar is not used anywhere else return someVar;

    if (x == true) return true; else return false;

    try{ //some code } catch(Exception e) { //too generic //nothing here. Not even e.printStackTrace() }

    public class Blah { //6000 lines of unindented noisy code with lots of //deprecated comented code in between }

    private List<Shit> someMethod(...) { // a thousand lines here return shits; }

    new BigDecimal("1")

    BigDecimal weight_of_john_doe = BigDecimal.GOOGOLPLEX; String something_that_could_be_enumerated = ...

    // returns frist public String getFrist() ..

    captcha "bene" - the are always our bene-factors

  • CaptainTroll (unregistered) in reply to CaptainTroll
    CaptainTroll:
    I also like to augue. There are seniors and seniors You can always learn from them anyway: from one kind you learn how to do things correctly, from the other your learn that you should not do what they do:

    ... mimimimi mimimimimi mimimimimi nananananana nananananana ...

    ...all of this done in a verbose language with a monstrous ecosystem.

  • Cheong (unregistered) in reply to C-Derb
    C-Derb:
    ammoQ:
    It's not that uncommon for an experienced developer to stick to the feature subset of an old version of a language, since that is what he originally learned and where he got his experience, and it "works for him".
    First, let me be a little pedantic: String.Format() existed in .Net 1.1, while String.Replace() and String.PadLeft() didn't exist until 2.0. (Unless I'm misunderstanding MSDN. Maybe I'm wrong.)

    What bothers me about this code isn't that this guy may or may not know about "newer" features like String.Format() or StringBuilder. The guy is clearly familiar with string concatenation as evidenced by the line that replaces <sessiondate>, so why not just use concatenation in the first place? Why is he doing a replace on a string format he defined?

    Of course, that's a rhetorical question, because his code clearly shows that he's a crappy programmer, and this is the code a crappy programmer writes.

    I still have VS2003.NET here and can reassure you the Format(), Replace(), PadLeft() functions and StringBuilder class does exist in v1.1.

    Btw, I can't see any part in this article say the code is written "in the old days".

    P.S.: I'm pretty sure VS2002 is the first publicly avaliable .NET IDE, with beta released sometime around 2001 (I still have one beta CD I got from talk in the university).

  • sdjt (unregistered) in reply to Sebastian Ramadan
    Sebastian Ramadan:
    In the IT industry, one should be aware that changes occur and improvements are constantly made, no matter what rank, "seniority" or otherwise. I see this error quite a lot in professors, too.

    The real wtf here is that the author hasn't recognised that brains degrade naturally with age, and that he is probably doomed to the same fate. Hopefully he will choose the path of humility and forego the title of "seniority", to prove to his peers that he's not interested in discriminating by age.

    [/b]Before I get lotsa "this butt-hurt, old man" comments, I'm twenty-five.[/b] I've worked along-side "seniors" (people who have served in the army, ex-teachers, programmers). They may be a bit hazy at times, but they have some interesting stories to tell, interesting lessons to teach and interesting ideas to share. If you're not willing to learn, then you're probably too arrogant to write software.

    Lets learn from the past, and not repeat the mistake that is this article...

    CAPTCHA: augue. I like to augue, in case you haven't noticed.

    Hey Fellas, this young'un whipper snapper 'ere reckons his wisdoms be soundin' like the preachin's of us older folk....

    Captcha: He's my haero.....

  • JJ the Pleb (unregistered) in reply to sdjt
    sdjt:
    Sebastian Ramadan:
    In the IT industry, one should be aware that changes occur and improvements are constantly made, no matter what rank, "seniority" or otherwise. I see this error quite a lot in professors, too.

    The real wtf here is that the author hasn't recognised that brains degrade naturally with age, and that he is probably doomed to the same fate. Hopefully he will choose the path of humility and forego the title of "seniority", to prove to his peers that he's not interested in discriminating by age.

    Before I get lotsa "this butt-hurt, old man" comments, I'm twenty-five. I've worked along-side "seniors" (people who have served in the army, ex-teachers, programmers). They may be a bit hazy at times, but they have some interesting stories to tell, interesting lessons to teach and interesting ideas to share. If you're not willing to learn, then you're probably too arrogant to write software.

    Lets learn from the past, and not repeat the mistake that is this article...

    CAPTCHA: augue. I like to augue, in case you haven't noticed.

    Hey Fellas, this young'un whipper snapper 'ere reckons his wisdoms be soundin' like the preachin's of us older folk....

    Captcha: He's my haero.....

    Fuck you old man, learn how to use BBCODE

  • (cs) in reply to Specific

    15 years experience should not be a problem...everything is still Octal...right???

  • sdjt (unregistered) in reply to JJ the Pleb
    JJ the Pleb:
    sdjt:
    Sebastian Ramadan:
    In the IT industry, one should be aware that changes occur and improvements are constantly made, no matter what rank, "seniority" or otherwise. I see this error quite a lot in professors, too.

    The real wtf here is that the author hasn't recognised that brains degrade naturally with age, and that he is probably doomed to the same fate. Hopefully he will choose the path of humility and forego the title of "seniority", to prove to his peers that he's not interested in discriminating by age.

    Before I get lotsa "this butt-hurt, old man" comments, I'm twenty-five. I've worked along-side "seniors" (people who have served in the army, ex-teachers, programmers). They may be a bit hazy at times, but they have some interesting stories to tell, interesting lessons to teach and interesting ideas to share. If you're not willing to learn, then you're probably too arrogant to write software.

    Lets learn from the past, and not repeat the mistake that is this article...

    CAPTCHA: augue. I like to augue, in case you haven't noticed.

    Hey Fellas, this young'un whipper snapper 'ere reckons his wisdoms be soundin' like the preachin's of us older folk....

    Captcha: He's my haero.....

    Fuck you old man, learn how to use BBCODE
    Be thankin' ye yung'un....this bbcode bit just ain't right. In my day we be writing in monospace on the olde green terminal....

    I tink augue comes from lorem ipsum

  • Smouch (unregistered)

    The real WTF here is that there isn't a better way to do such replacements built in to the .NET library.

    After all how hard would it be to have the previous look something like this:

    string str = "<sessionid> <client> <sessiondate>.XLSX"; string[] rep = new string[3]; rep["sessionid"] = row["clientname"].ToString(); rep["client"] = row["clientname"].ToString(); rep["<sessiondate>"] = time.Day.ToString().PadLeft(2, '0') + " " + time..........";

    str path = string.converge(str, rep);

  • (cs) in reply to Smouch
    Smouch:
    The real WTF here is that there isn't a better way to do such replacements built in to the .NET library.

    After all how hard would it be to have the previous look something like this:

    string str = "<sessionid> <client> <sessiondate>.XLSX"; string[] rep = new string[3]; rep["sessionid"] = row["clientname"].ToString(); rep["client"] = row["clientname"].ToString(); rep["<sessiondate>"] = time.Day.ToString().PadLeft(2, '0') + " " + time..........";

    str path = string.converge(str, rep);

    Du-uh? What's wrong with:

    str = row["sessionid"] + " " + row["clientname"] + " " + row["sessiondate"].format (<some format string>) + ".XLSX";
    

    ... or whatever the damn format is of this language? I refuse to believe you need "ToString()" methods on what are very probably strings.

  • SJ (unregistered)

    I worked for a BIG name company (not going to say any name but all of you know it) and exactly the same style was used instead of being C# it was Java and instead of using human readable <client_id> something like @c.

    Just to note that it wasn't for backward compatibility reasons the "product" was brand new and String.format was an option ...

    After I showed them a benchmark of the cost of String.replace compared to String.format they just replied that it worked well enough the way it is so no need to update the code ...

    Oh well ...

  • No One Of Consequence (unregistered) in reply to nitePhyyre

    Of course, they might be excused for conflating Windows 8 with Win2k8, which really was released about 5 years ago. I had fun with a job shop advertising for 5-10 years experience with Win95 in 1996. The pimp^H^H^H^Hrecruiter didn't blink when I explained to her how Windows 95 used to be called Macintosh... lusers LOL

  • (cs) in reply to Herwig
    Herwig:
    2002 I applied for a job at a company that created web solutions with PHP and MySQL. They proclaimed they're having more than 25 years experience in this. Unfortunately their website (auerwebsolutions.at) is not available any more... (it really looked like designed in 1977)
    Herwig:
    The cruelty of internet: it never forgets...
    Even worse: There's an archive of it!
  • Krunt (unregistered) in reply to C-Derb
    C-Derb:
    First, let me be a little pedantic: String.Format() existed in .Net 1.1, while String.Replace() and String.PadLeft() didn't exist until 2.0. (Unless I'm misunderstanding MSDN. Maybe I'm wrong.)

    I'm not sure about String.PadLeft but I'm pretty sure String.Replace and String.Format have been around since 1.0 (.Replace definitely has; what would you use otherwise?)

  • Scourge of Programmers! (unregistered)

    The point that most of the regular readers seem to be missing is that people will program in a format they're comfortable with.

    When ADO .NET came on scene, there were multitude of programmers adding references to the COM ADO libraries and using them. I am currently overseeing one such project.

  • C-Derb (unregistered) in reply to Krunt
    Krunt:
    C-Derb:
    First, let me be a little pedantic: String.Format() existed in .Net 1.1, while String.Replace() and String.PadLeft() didn't exist until 2.0. (Unless I'm misunderstanding MSDN. Maybe I'm wrong.)

    I'm not sure about String.PadLeft but I'm pretty sure String.Replace and String.Format have been around since 1.0 (.Replace definitely has; what would you use otherwise?)

    I looked up String.Replace on MSDN and there was a dropdown list for "other versions". The earliest option available is .Net 2.0, while String.Format has a .Net 1.1 option. (Maybe that is simply when the documentation showed up?)

    So admittedly, I reached my conclusion very lazily. I have no idea how to determine exactly when a feature was introduced, but I would have expected all 3 of those methods to exist in 1.0.

  • anonymous (unregistered) in reply to Krunt
    Krunt:
    C-Derb:
    First, let me be a little pedantic: String.Format() existed in .Net 1.1, while String.Replace() and String.PadLeft() didn't exist until 2.0. (Unless I'm misunderstanding MSDN. Maybe I'm wrong.)

    I'm not sure about String.PadLeft but I'm pretty sure String.Replace and String.Format have been around since 1.0 (.Replace definitely has; what would you use otherwise?)

    10 CLS:INPUT"String";H$:INPUT"Replace";O$:INPUT"With";N$ 20 I%=1:O%=LEN(O$):N%=LEN(N$):WHILE INSTR(I%,H$,O$) 30 I%=INSTR(I%,H$,O$):H$=LEFT$(H$,I%-1)+N$+MID$(H$,I%+O%):I%=I%+N%:WEND 40 PRINT H$

  • (cs)

    If anyone actually cares, below is one of the best (I don't claim it's the best!) ways to do this in C#. The real meat is in the last line, but I included some build-up code in case anyone wants to test it.

    DataTable tbl = new DataTable();
    tbl.Columns.Add("sessionId", typeof(string));
    tbl.Columns.Add("client", typeof(string));
    tbl.Columns.Add("sessionDate", typeof(DateTime));
    
    tbl.Rows.Add("1234567", "AMWEST", new DateTime(2013, 10, 8, 14, 37, 21));
    
    DataRow row = tbl.Rows[0];
    
    string fileName = string.Format("{0} {1} {2:MM dd yyyy}.xlsx", row["sessionId"], row["client"], row["sessionDate"]);
    

    Matt, you are right in that ToString() is not necessary for the string concatenation of the values that are actually strings. C# will coerce them from the objects that the DataRow provides.

  • The Crunger (unregistered) in reply to Nagesh
    Nagesh:
    Ryan V:
    TRWTF is how he had 15 years of experience in a language that's only 13 years old...
    Maybe working in similar languages.

    Exactly. When a company claims to have 25 Web Experience, this just means they were working on the web and its logical predecessors. Before gore createth the WWW (actually not gore himself, but bright men inspired by gore), there wert USENET, Gopher and other beasts of the field. A company that was spamming people on USENET and transitioned to HTTP could claim 25 years of web experience.

    Visual C# had many logical predecessors, including Visual Basic and Visual C++. Visual Basic had a diverse set of logical predecessors, including work in Benefits Administration and/or Occupational Therapy. With retirement ages rising, resumes could plausibly list 40 years of experience in C#.

    I see what I just did there. I agreed with registered Nagesh. Must. Rethink. Life.

  • Sebastian Ramadan (unregistered) in reply to The Crunger

    I would suggest that J (a Java mimic for which Microsoft got sued) and Delphi .NET (a platform which Microsoft essentially stole by buying out the lead Borland developer) are probably better predecessors than Visual Basic. I'm far too young.

  • (cs) in reply to Sebastian Ramadan
    Sebastian Ramadan:
    I would suggest that J (a Java mimic for which Microsoft got sued) and Delphi .NET (a platform which Microsoft essentially stole by buying out the lead Borland developer) are probably better predecessors than Visual Basic. I'm far too young.
    J predated Java by many years, therefore does not "mimic" Java (it is a successor of APL) and was invented by Kenneth Iverson and Roger Hui, not Microsoft.

    You were probably thinking of Microsoft Visual J++, which indeed was the Java clone for which Microsoft got sued.

  • Also Not snoofle (unregistered)

    I remember early on in .Net's life (2 years after 1.0 was released) having head hunters ask me if I had 5+ years experience in c#. For awhile I uselessly tried to let them know that the language hadn't been around that long; then one day I finally just said Yes to get past the crap.

    Of course they like to "format" your resume over here before sending it on to the people actually doing the hiring. When I'd get to an interview I'd explain to them that, yes, I knew c# hadn't been around that long, and yes, I have no idea why the recruiter would put that on there while telling them exactly how much experience I had.

    After awhile you don't tend to update your resume much. Just change a few numbers around, maybe add a couple more hot button terms. So, I wouldn't call this one much of a WTF.

Leave a comment on “The Senior Format”

Log In or post as a guest

Replying to comment #:

« Return to Article