@Someone You Know said:
Why did all of you take these pictures facing the wrong way?We are clearly facing the right way, what's wrong with you? Feel left out?
@Someone You Know said:
Why did all of you take these pictures facing the wrong way?We are clearly facing the right way, what's wrong with you? Feel left out?
@dhromed said:
Mine too, but an old one. I've given up playing blurnsball now - i was really shit at it. Whole new swathe to cut with computing.@Scarlet Manuka said:
My avatar is certainly a genuine photograph of me.So is mine.
@morbiuswilters said:
I'm a man, so I never read the book@morbiuswilters said:
It's a decent movie but far too prolix.Outta here, Wintergreen. No-one who doesn't read says "prolix".
@TGV said:
Well, obviously. But I'm wondering what Hatshepsut has seen, if he's being sarcastic rather than pointlessly haikuic.Coding is a bit lousy. Instead of breaking out of the loop, you could return true or false. And of course, you could use ArrayList and then contains:
if (TRUE_VALUES.contains(tempValue)) return true;
if (FALSE_VALUES.contains(tempValue)) return false;
throw new IllegalArgumentException("value must be one of the accepted values");
@dtech said:
I think it's more like this:Poetry in pseudocode. So much painful experience distilled into those few lines.
<font face="Lucida Console" size="2">
Line1 = file[0].split(212);
Line2 = file[1].split(211); // Next line might only have 211 spaces before filename
</font>
@morbiuswilters said:
@swiers said:I have found it useful when using web forms that have varying numbers of rows depending on how many of something there are. For example you might present someone with a feedback form with space for one comment for each product they bought. You don't know in advance how many comments there will be so you do something like "input name = comments[]" and it just adds it to an array (not sure of exact syntax but you get the idea).(Honestly, I just learned that bit about param arrays myself, and it my not have been valid in older PHP versions.)It's been in PHP for a very long time. It is a bit obscure, though. I really never found cases where it was useful, but YMMV.
@swiers said:
eval( "$foo_fat_id = $foo_fat_id;" );My php is rusty so just checking I've got this right. It sets the variable $foo_fat_id to the current value of $foo_fat_id ?
@morbiuswilters said:
@PedanticCurmudgeon said:@token_woman said:D'oh!!! Just got it. "Integer theInt". Yeah that would be peeler-worthy indeed in a language that had two different types, int and Integer.What language is it? Ada's case-insenstive and has an int-like type called integer.
However, the language I work in (but not for much longer, Hurrah!) is not actually Java but a subset (an idiotic subset) which has no Integer class and its int-like type is called "integer".
That sounds so far-fetched I don't actually expect anyone to believe it, but it's true. So ... well .... ner.
Edit: oh, and it's case-insensitive so "integer" / "Integer" OK. No, I don't expect you to believe that either.It seems like she's saying it's a subset of Java, so likely some awful, proprietary language that gets run through a preprocessor and turned into Java.
Wish it was Ada - at least that has a kind of old-school patriotic chic. Sadly though, morbius is spot on.
I taught an admin worker how to cut and paste. I had found her reading data from one spreadsheet and typing it into another. This was in the public sector so we're talking taxpayers' money here. What really makes me shudder is the thought that she might have sat through my showing her, thought "hmm, looks kinda high-falutin'" and gone back to her original method.
D'oh!!! Just got it. "Integer theInt". Yeah that would be peeler-worthy indeed in a language that had two different types, int and Integer.
However, the language I work in (but not for much longer, Hurrah!) is not actually Java but a subset (an idiotic subset) which has no Integer class and its int-like type is called "integer".
That sounds so far-fetched I don't actually expect anyone to believe it, but it's true. So ... well .... ner.
Edit: oh, and it's case-insensitive so "integer" / "Integer" OK. No, I don't expect you to believe that either.
@dhromed said:
@token_woman said:
theIntPeople who write these kind of variable names in earnest should probably have their privates run through with a potato peeler.
Not that that wouldn't be fun, but in the kind of example I was writing (a generic function for doing something with an integer completely out of any context), what better name would you suggest?
public static boolean wank(integer theInt)
{
return theInt == 1 || Math.mod(theInt,2) != 1 && wank(theInt/2);
}
Just some recursive wanking
@morbiuswilters said:
@alegr said:YesIs it the same as dick-tation?Is that anything like lac-tation?
@pkmnfrk said:
What's so WTF about it?Nothing, to my mind - I think it's rather good. I'm about to start PHPing again after a foray into the static-typed world, and being able to do $classname.someStaticMethod() is something I'm looking forward to.
@TGV said:
However, saying "chompz" to your code, doesn't really do very much, does it?No, but it might make you feel better.
Coding Horror refers to it as rubber duck problem solving
@morbiuswilters said:
@BlueKnot said:LOL... that's just what I was going to sayAnd [ Y ] is Flux Capacitor.
(.Y.)
@Seahen said:
How many left-handed screwdrivers does it take to change a light bulb?Not sure, but I've seen a large team of programmers try and fail.
@dhromed said:
Doesn't look as pozidrivy in that font as it doesHere.
but it's a lot better than [+] which is obviously phillips, or [X] which should be reserved for some future proprietary-ass hardware that will no doubt be invented, resulting in technicians having to buy their screwdrivers by the dozen because THEY MAKE THOSE THINGS RIGHT ANGLED FOR A REASON
Found the perfect pozidriv symbol, bloody thing won't render though
@morbiuswilters said:
When I started I discovered that his preferred method of development was to fire up vim on the production servers and tweak until he got something working, then scp it to all the other servers.
$Boss from my previous post had a better method, which took him less time and therefore was obviously preferable:
Fire up vim on customer's server and tweak until he got something working.
That's it.
We had 150 customers running our software (I shudder to think what they all must have done in previous lives) which meant, by this method, we had 150 versions of the code.
I think the idea was, when one person has complained of a bug, why spend time fixing it for the other 149 who haven't noticed?
@morbiuswilters said:
The nadir was when he asked me to remove all JOINs from my queries because he didn't understand how they worked.
Reminds me of this conversation I had a few years ago. Standard count-the-WTFs territory:
Boss: What are you up to?
Me: Just fixing the deb packages we use to install our software. They had no dependencies defined, despite having many actual dependencies. So I'm putting them in.
Boss: No! No! Don't do that! Never do that!
Me: Why not?
Boss: Because I had a terrible experience with that, once. Customer had a problem, so I logged on and did a few things to try and fix it, including uninstalling package X that our package depended on. So I did and Boom! Out went ours with it.
Me: Erm ... it must have warned you ...?
Boss: Do you think we have time to READ what spews out of the terminal? Sheesh! Job to do, anyone?
Me: OK, well, it can't have been the end of the world. So you just reinstalled it, right?
Boss: Reinst- ... what? No, I couldn't just "re-install" it. I'd lost all the code I'd written on there - all the edits I'd made, over the years, to the files contained in the package.
Me: Oh.
@morbiuswilters said:
You also watch as you are unable to attract good developers because they don't want to spend all day writing tests to confirm that a function which adds two numbers, in fact, adds those two numbers.You know what else is annoying? Writing programs that output "Hello World", all the bleedin' time.
@KattMan said:
I think another part of it is the old adage: "The customer is always right."Yes I was thinking about this too. In other types of business it makes more sense, because it is very unusual for a customer to start telling a plumber, for example, how to do their job. It happens but they stand out as nightmare customers. In software it is much more normal.
@Anketam said:
By any chance is she a blondAnketam, by any chance are you a douchenozzle?
What's the problem? Can't you just write some code to deal with it? Just subtract 6000, 12000, whatever ...
(Yep, I'm being sarcastic, but the lead devs who've said things like that to me before sadly weren't.)
This is part of a general problem in the software business. Customers who don't know how to design software systems ask for a software system with such-and-such a design. And, duh, we end up selling them a shit system. At the very most, the customer's design ideas should be taken as indications of what the real requirements are. Usually they are just confusions, and should be ignored.
What causes software engineers to take on customers' design and implementation ideas as though they are requirements? I think it has a lot to do with lacking confidence in getting it right themselves. If the customer says "we want low error levels suitable for a critical system" and the engineers implement that how they see fit, then what if they get it wrong? They will only have themselves to blame. But if the customer says "we want six variables" and you give them six variables, and it doesn't work, you can blame the customer.
Except you can't, of course, since the low error incidence was the real requirement, and that was your responsibility, even if it meant sticking your neck out.
Another reason, I think, is that a lot of engineers are not that great at requirements gathering in the first place. So they don't know how to get any better information out of the customers than "Six variables please". Something like the Five Whys technique would help in that case.
Or they are afraid of not giving the customer what they want. But it's better to stand up to them at first than to suffer the backlash of supporting and maintaining the pile of crap that they think they want.
... except they are apostrophes, not inverted commas ...
@SEMI-HYBRID code said:
Yup. Been there. Except it wasn't websites, but the code behind basic office infrastructure. But don't worry, it was only minor code-tweaking and bugfix testing that we routinely did on clients' live systems. Minor in the sense of "it should only take an hour or so, and won't break anything if your're careful" (In work hours of course, since the company couldn't afford overtime - can't imagine why not!).(and then there are some minor WTFs like having no source control or testing servers, doing all the modifications the clients want directly in their live version, not even downloading the sources (PSPad with its ability to edit files directly through ftp is handy)), so when something screws up, all i can (and have to) do is some psychic debugging, or editing the source adding error_reporting(E_ALL) on the beginning of file, saving, refreshing the (live, official, public) page to see the errors, and quickly go back to source, comment out the error_reporting command, and save again... but it at least teaches/makes me think and edit strategically when adding new functionality - bottom up: add new function to model first, so the app doesn't crash on calling something that doesn't exist, save, check if i broke anything, then make the function accessible/use it in controller, save and check again, then add the button/whatever to view to actually make it available.)
...
(if you want to see me working today, periodically refresh zlava.odpadnes.sk and zlavy.odpadnes.sk and watch if you notice the changes)
@Cassidy said:
the runaway lorry of stupidityWhich actually exists, see this footage:
I'd have thought PiXiE boots would be more suitable.
@Sutherlands said:
Careful, read his Terms of Use before wielding cluebats! He is probably just pretending to be making an unsupported point, to be funny. Or ... something.@blakeyrat said:
I think this is an east coast vs. west coast thing.Your BS meter isn't going off right about now? You don't listen to yourself and think "I've got nothing to back up my position. I have no reason to think this is the case except my own anecdotal evidence."? 86% seems like "an east cost vs. west coast thing"? Geez, blakey, hit yourself with the cluebat.
@Steve The Cynic said:
Or he might have 20 years' experience mostly in languages with sane assignment-destruction semanticsThat's charitable. It looks to me more like he just doesn't understand what assigning an object to a variable actually does.
@dhromed said:
You mean that's not morbiuswilters in the picture?@morbiuswilters said:
I've run Linux as my desktop OS for a decade now. I've only done serious development in the *nix world. I've been sysadmin for hundreds and hundreds of Linux servers, serving up enormous amounts of traffic.Your cock grew three sizes typing that, did't it.
@blakeyrat said:
If my post would be funnier by my pretending I don't understand X (where X is "GREP" or whatever), then I pretend I don't understand X.
@blakeyrat said:
I know it, I just don't like it.OK, I'm pretty sure I remember posts of yours claiming you don't know what "grep" means or whatever, but whatever.
If I'm going to spend my time writing a program, I'm going to write it for the OS that wasn't designed by clowns, that frequently and consistently has new features added, that has a stable installation system that works on every copy of the OS, that has a decent security system, that practically guarantees that a correctly-written program will keep running for the next 20 years without me having to give the source code away.Erm ... what?
Cool, I just googled "foo" and discovered there is an RFC for the etymology of "foo"!
foo',
bar', or `foobar' as metasyntactic variables without@C-Octothorpe said:
he does seem to know his stuff, IT related anyway...Agreed - apart from the <sarcasm> tiny </sarcasm> percentage of IT "stuff" that involves Unix and/or anything open source - both of which blakerat makes it a solemn principle of his NOT to know anything about, for fear of getting cooties.
@cmccormick said:
To be pedantic, I think what drives changing the 'addthree' function from returning 7 is another test (e.g. assert(addthree(5)==8); would fail), not refactoring. Refactoring would be to remove any cruft in the function. Probably none would be required for something that simple.It does seem strange to call it refactoring but according to Kent Beck it definitely is. He gives a very similar example to mine near the end of chapter 1 of TDD By Example. Having made the test go green by returning a constant, he then gets rid of the duplication across code and tests, as part of the refactoring step.
Never mind about the Sutherlands mix-up, my period is over so I'm not upset about it any more :)
... should have said "too sarcastic, etc ... for everyone but dhromed, who appears to be awake" cheers dude :)
Thanks for all the praise for my TDD explanation.
When CPUWizard attibuted it to Sutherlands instead of me, I thought this was kind of funny since my user name is what it is. So I posted a sarcastic comment pointing it out. Obviously a bit too dry and sarcastic (even given the tag about boobs, which I thought made it obvious). Sorry for any confusion.
@Cassidy said:
It makes sense, I guess - get it working, icing on the cake later
@TheCPUWizard said:
@token_woman said:+1, thanks Sutherlands! Credit where credit's due!@Sutherlands said:It's not a type of refactoring but a method of writing code in general.What is red/green refactoring?
It's the basis of test-driven development.
The first stage of any bit of code-writing in TDD is to think about what you want the code to do and express that by writing a unit test. Of course the test will fail because you haven't written the code yet - but you still have to run it and check that it fails, because if it passes you know that the test is useless / incorrectly written. That is the red stage (red = fail)
The next stage (green) is to write whatever rough, shit, crazy code is necessary to make the test pass.
After that, you refactor. The important thing here is that refactoring is not an optional extra; it's an integral part of the process. The stage where you write whatever you can to pass the test is just that - a stage. One out of three. This can cause conflict with traditional-type project managers who think that refactoring is unnecessary.Sutherlands - thanks for posting the explaination.
@Sutherlands said:
It's not a type of refactoring but a method of writing code in general.What is red/green refactoring?
Had this conversation with lead developer the other week. I put down some refactoring work as chargeable on my timesheet and he said "We don't charge clients for refactoring".
A discussion ensued, and he said that the reason we don't charge them for it is that the time we spend on it is avoidable - it is self-inflicted wastage of time, due to "getting the code wrong" that we "should have gotten right in the first place".
Given that we have clients who drip-feed us requirements over a period of months, I fail to see how exactly we are supposed to know what is right in the first place when we don't even know how the code we are writing at that time is going to be used a few months down the line.
So yeah, I just do and say I didn't. And still waiting to view the consistent perfection that is his code :)
@corgimonster said:
Consistency. All Enterprise Library application blocks feature consistent design patterns and implementation approaches.I see what's happened here! They got Nagesh to write their documentation. Translated into English, it should read:
"All Enterprise Library applications block [any attempt at] consistency in features, design patterns, implementation or approach"
@deathy said:
it only did "men's work;
his anger over having a youngster as his boss,Send him over! I love dealing with guys like that
@Sutherlands said:
yebbut you know what he MEANS ....I'm pretty sure if that's a representative line that property 109 IS set.
@Someone You Know said:
people with Computer Science degrees who've been taught everything about relational algebra
Maybe they'd been studying The Art of Computer Programming, in which a byte is 6 bits (when it's a binary byte, as opposed to a decimal byte!) and got it slightly wring.
I'm getting a 404 on that pull request link. I wonder if it might have been spammed by trolls or something? Just a guess.