@morbiuswilters said:
Jesus, I hate comments like that. It makes me want to punch someone.
You need something with more authority than a mere fist. I, as usual, recommend pulling the GAU-8 out of your back pocket and using that in some way.
@morbiuswilters said:
Jesus, I hate comments like that. It makes me want to punch someone.
"heavy duty production servers, each with 16-3.2GHz cores"
Um, no. With 16 cores, they are no heavy duty. I worked for a while at ((large financial information provider)), and we had production servers with 192 cores.
All this talk of SPSS and Java threw me for a moment, until I remembered that I haven't needed to keep up... SPSS is nearly as old as me, and I have colleagues young enough to be my children and old enough to not be students anymore. SPSS certainly wasn't in Java when it was first released, in 1968...
How time flies when you're having fun...
@RichP said:
Has he receieved his bear trap and tourist map of the pentagon yet?
@dcardani said:
@PJH said:Using memset() to 'zero' floats... is not well-defined.Really? Is this a platform specific thing? IEEE floats represent 0 as all 0 bits, don't they? When is memsetting it to 0 not OK? (Or do you mean in the case of non-IEEE compliant floats?)
Welcome to the weird world of C/C++ portability. The language definitions refuse to define anything about certain behaviours in these languages. Noteworthy among these undefined behaviours are:
I can tell one important thing about SomeClass. There is no virtual inheritance involved anywhere in it, because that requires invisible pointers (or offsets, meh) inside the virtual parents so that they can find the shared virtual base.
And the other thing is that there aren't any virtual functions, because the memset would destroy the vtable pointer.
@Cassidy said:
@Steve The Cynic said:
Still, it's the only email system where I've ever received a multi-line email written entirely in the subject field.Peculiarly, many of the staff at my workplace think it's perfectly fine to fill the subject line with a long announcement, requiring opening and replying to the email just to word-wrap the content and read the damn thing. It's annoying.
But in my case it was worse than that. The email was sent by the in-building Cordon Bleu-rated chef. She was a nice enough person, and her presence made the company cafeteria a better-than-you'd-normally-expect experience, but she lacked eptness on computers. On more than one occasion, she sent multi-paragraph emails written in the subject field (not just really, really long single paragraphs). Lotus Notes allowed you to put line breaks in the subject line. (This was 1998 or so. They may have fixed it by now, or maybe not.)
Needless to say, these messages made the list-of-messages display a bit surreal.
@El_Heffe said:
@topspin said:
@El_Heffe said:The emphasis was put there by the I Hate Lotus Notes website, I didn't do it. I used Loutus Notes every day for 12 years. Thank goodness I no longer have to suffer that pain. I use Thunderbird at home and for home use it's "good enough". I just thought it was funny that a free, mediocre email program beat out an expensive commercial program sold by one of the biggest comuter companies in the world.@I Hate Lotus Notes said:You put the emphasis on the wrong line. Or haven't ever used Lotus Notes before. I would have guessed even bots wouldn't vote for Notes.Which would you rather use?
- M$ Outlook (49%, 7,524 Votes)
- Thunderbird (21%, 3,238 Votes)
- Lotus Notes (19%, 2,982 Votes)
On a related note: I'm officially Notes free now for 11 months. The world is a better place now and the grass is greener.
I remember that pain, although I only had to suffer through it for 18 months. Still, it's the only email system where I've ever received a multi-line email written entirely in the subject field.
I use Thunderbird at home because it isn't bad enough for me to fart around finding something better.
It's strange... I saw SDLC and my first thought was Synchronous Data Link Control, and the rest of the post confused me a great deal.
@BlueKnot said:
It's possible that the USPS passed it on to another iternational or European carrier and they are not providing status back to the USPS tracking system. The last update USPS has is just before it left their control.
Yes, but David said that it shows as having arrived in LA, but not having been given to someone else. The lack of feedback from non-US carriers back to the USPS is normal (and happens in both directions between e.g. the UK and France), but you'd think they could at least update the status to "Handed over to some foreigners we don't know anything about (nor care, they're probably just a bunch of rag heads anyway)".
Oh, and don't forget I'm one of those foreigners, but I'm not a rag head.
These weren't function names, but a system I worked with many moons ago had some variable with interesting names. The codebase had been developed by an external software house and then brought in-house. The external developer wanted to celebrate buying a new car, so he named a central variable in the home-grown threading system "golf_gti".
Adding to the confusion: Part of the system calculated an estimate of gas compressibility (i.e. deviations from the PV=nRT ideal gas law), and the formal textbook statement of the formulas involved the Greek letters pi and tau. For whatever reason, someone involved in this had the bad habit of pronouncing tau as if it were spelled "tor", and then tried-and-failed to express the natural spelling of this in a dialect of BASIC whose parser would lift keywords ("OR" in this case) from variable names. So he used a different name, and this name made it into the C codebase we were maintaining, along with an understandable misspelling of pi.
The result? A classic 'Representative Line':
double apple, pie;
@morbiuswilters said:
I have to wonder what world you guys live in. Whenever I've been contacted by recruiters (which is all the fucking time they are spamming my voicemail and inbox) they include a full job description in the email. If there's any ambiguity, I can ask for clarification and usually get a sensible answer within a day or so.
In the world I live in, I get email that says nothing more than "Hello Steve, I have an interesting opportunity, please send me a CV!"
@token_woman said:
@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.
Edit: Had a think about why it seems that way to me, and I think it's because he said "But I closed it" rather than "But I reassigned it" or "But it would have got destroyed there right?". The fact that he said "But I closed it" suggests that he thinks "it" is the same statement all along, somehow ...
Anyway, I'm done, it's 6pm on Friday where I am, so I'm getting off the soap box and going home to start my weekend with some nice French wine.
I'd let you all know my real opinion, it's Friday afternoon and I go home for the weekend in just over an hour, so I can't raise the enthusiasm for withering contempt for a language with indeterminate object lifetimes.
Seriously, though, he might be one of those people with 20 years' experience where all those 20 years are actually the same year. Or he might have 20 years' experience mostly in languages with sane assignment-destruction semantics, although the what's-the-big-deal remark makes me suspect otherwise. (Java is not one of these languages, by the way. It always amuses me when I see IT trade journalists - and others - writing in an admiring way about Mr Gosling. I know a guy who used to work with him, and the things my friend has said about Gosling don't bear repeating, but do explain a great deal about why Java is the way it is.)
See, with sane assignment-destruction semantics, the disappearance of the first prepared statement object (by its reference receiving a new value) would call the destructor immediately, and that would be coded so it closed the cursor and did whatever else it needed to do in order to clean up after itself. Note that although I normally prefer C++, it isn't the only language with the required semantics, as for example things like Python also do the right thing while simultaneously also having the everything's a reference semantics of Java.
But what do I know, anyway?
@pjt33 said:
@blakeyrat said:No, silly, he was talking about two different people... (ba-da-boom)A real American, and decent human being, would spell it "socialize."There are real Americans who are decent human beings?!</troll>
@frits said:
Enjoy. Borderline NSFW.
Looks like a refugee from Geocities / Tripod.
Those were the days. Let them stay there, dead and buried.
@topspin said:
Their all-upper-case shit is horrible to read though, IMO. Seriously, stuff like LPCWSTR instead of const wchar_t* ?? We don't have segmented addressing anymore, why declare pointers as "long pointers"? </mini-rant>
Actually, we do have segmented addressing. Still. On x86. What, you thought the segment registers disappear in 32-bit protected mode? Don't make me laugh. On Win32, three of the six segment registers (DS, ES, SS) contain the same selector that selects a read-write segment. CS can't contain such a thing, because its segment has to be executable, so it contains a *different* selector that selects the same range of memory, but in a read/execute mode. FS contains a selector for a tiny (16-bit) segment containing the thread-control-block, and it is done this way so that any code that wants thread-specific data can just look in FS:xxxx. GS isn't used.
Of course, you can't tell that this is going on most of the time, and in fact, a Win32 LPFROBBLE is not a far (long) pointer. It is actually a large near pointer. (large because it is 32-bit, near because the segment selector is not included. Win16 LPFROBBLEs were 16:16.)
@blakeyrat said:
So... you did a full day's work for them, in fact it would have taken them several days since they had nobody with your skills... for free?I hate to break this to you, buddy. Be proud of your programming skills, but I think you got totally screwed. A contractor would have charged $2000+ for the work you did.
Nah, it was a test, nothing more. I first spoke to them in another interview four years earlier, and even by then they had a product that could do way more than what I wrote on that day
@Justice said:
I don't get this; sounds like you were probably a great fit for the job and exactly the kind of guy they needed. What were the "other reasons?"And on a side note, what sort of background do you have that got you in the door at a place like that? Sounds like really interesting work.
The other reasons were mostly the concern (on both sides) that I'd be bored stiff, because the work would be pitched at the level appropriate to the general stream of candidates, coupled, I suspect, with a concern on their part that I would be wanting to be paid more than they wanted to pay for the position.
My background at the time was fairly mixed, a bit of industrial controller (gas flow correction, PID loops, that sort of thing), a bit of network comms (an ATM switch that failed in the market despite being immensely better quality and value for money than the competition, go figure), and some anti-virus work (but not the virus detection / disinfection part).
Oddly enough, molecular physics was not on that list.
In other words, someone with a wide range of stuff, and the ability to turn my hand to whatever comes along.
@DaveK said:
Wait, what? You "won" the test by crashing the simulation? Now where have I heard that before .... ?
It was worse than that. The framework was a bunch of reasonable-quality C++ source code, and I just had to create a derived-class object, populate it from the file, and then use methods on the base class to help me display the object. A key one of these methods was missing.
It was, nevertheless, how I won the test. (Well, that and finishing the assigned task that nobody had got even as much as half-way through.)
@Zecc said:
In other words, they got they got their molecule visualizer for free?
;) Well, if they did, it doesn't say much about their main product...
In fact, no, it really was a programming exercise, because they were an established publisher of this kind of software.@DaveK said:
Holy moley! I've never been asked anything beyond the "average ten numbers in an array" or "reverse a string" kind of coding questions in interviews.
I have. I once went to an interview which lasted all day (including going out to lunch with a couple of the guys), and the assigned programming task was, well, a task. The company made molecular modelling software, and they asked me to write a program (C++, circa 1999, Silicon Graphics workstation running Irix) to read a description of a molecule from a plain-text file and render it on-screen as a stick-figure model.
They provided an object framework into which I had to plug my code, and at the beginning they told me not to worry if I didn't get through the whole thing.
So far, so good. Now for the WTF in all this.
About 40% of the way through the allotted time (a total of several hours), I fell into a nasty hole in the framework - bad enough that I could not continue - because, as they said, "nobody's ever got this far before", apparently not even them. Fixing the deficiency in the framework took only five minutes, but that only makes it more WTFy.
In the end, I finished the program, and showed them the display of the molecule, including the bonus feature of being able to swing the view around the molecule. Based on what they said, none of the other candidates they had had before me could even get the molecule read in from the file.
For that and other reasons, we both decided it wasn't a good fit...
But the most WTFy interview I ever went to was five hours long, from 10am to 3pm, and all I got in terms of lunch was a vague, "well, there's a sandwich shop up the road that way."
@Chewbacca said:
Am I being an ass for nitpicking about where/when objects are being constructed?
This depends. If you are still building the application, you should focus on functionality rather than performance.
If, on the other hand, you are finishing up or maintaining the code (and the note about implementing a fix/workaround suggests this), then you should be concerned about this. I recall a case in C++ code where a function call that passed a super-simple object (two integers representing an IPv4 address and a TCP/UDP port number) by value rather than by reference cost the application 10-15% of its CPU charge (due to this call happening *a lot*, and calling the copy constructor and the destructor every time).
@blakeyrat said:
I think we can universally agree that, all else being equal, the smallest scope for a particular variable is best, right? This coding standard conflicts with that common sense rule without adding any benefit.
In general, I'd agree that we should reduce the scope (and lifetime, a different thing) of variables, subject to the usual caveat of not reducing them too far. However, knowing how far is too far can be difficult sometimes.
And the coding standard does have one benefit - a consistent look and feel across the entire codebase. This is important, because maintenance programming is often done by people who aren't familiar with all details of a particular codebase. If I know that (picking an example relevant to this discussion) the DB connections are always managed *this* way, then I can concentrate on understanding the business logic. If one part of the codebase does it a different way, I then need to expend neuron time understanding that difference as well as the business logic (mostly so I can understand where the differency bit ends and the business logic begins).
As I've said elsewhere, my objection is not to changing the technological concepts that underpin the codebase. No, I object to (i.e. I think it is a bad idea) undisciplined inclusion of new (new-to-the-project, not only-just-invented) structures apparently on a whim. (Yes, I know there are good reasons to prefer the new way in the OP's case, but he approached the introduction of the new way in completely the wrong fashion.)
@Jaime said:
So, all progress is bad? The current situation exists because the person who sets the standards refuses to even think about changing, even though the tools he is using have changed. I could understand a few years of sticking with the old standard to avoid confusion, but this change is fifteen years overdue. The OP mentioned that this is a new project, so there is no potential to have a confusing code base.
Tut. I didn't even begin to say that progress is bad. Progress *for the sake of progress* is as bad as blindly clinging to the past, but if there is a good reason for it (something better than "there's a new technology, gotta use it", not that that applies here), then go for it.
But don't just charge off into the (to others) unknown territory of a new way of doing things without making sure that others are on board. The dark side of thinking that because it is a new project, there is no issue of a confusing code base is that you make the *organisation's* collective code base fractured, with one part over here that does it in a completely different way from the rest. Are you suggesting that the OP's company divides its developers into "old way" and "new way" groups to avoid the issue of stylistic confusion that arises from having distinct ways of doing X?
Note that I'm not saying that one should never introduce or adopt new ways of doing things, new tools and technologies, etc. I'm saying that it should be done in a controlled and disciplined way, not by a single developer sneaking under the radar.
Oh, and my notion of "noise" has been misunderstood. The choice of methods for managing connections does not contribute to meeting the functional requirements - what reports to produce, what data entry pages exist, etc. The way you manage connections is an implementation detail (it may have large footprint, mind you) that will impact non-functional requirements like performance and scalability. For an in-house web application, unless the company is very large, scalability may well not be an issue, so maintenance programming issues become significant.
All that said, however, I suspect that the coding / design standard is an office-politics power-play issue rather than a technical issue.
My thoughts begin with this: when someone looks at your module, they will see that it is different to the rest of the system. If I saw something like that, I would immediately start searching for *why* it is different. I mean, there has to be a reason, right?
The senior dev is part of the WTF, for two reasons:
* Blind adherence to the standard, because it is the standard, rather than for an explained reason
* He started by calling you out on it in public.
However, he is only part of the WTF here. *You* are the other part, because you just disregarded the standard and went off in your own direction, without consulting anyone first. There may be a reason for the selection of a particular structure (I'm not qualified to comment on the relative virtue or lack thereof of .NET stuff, sorry), but don't forget the other reason for picking a standardised approach: parts that are, in essence, "noise" (i.e. just implementation details) should be consistent in appearance, so that they can fade into the background, which helps you and your colleagues to concentrate on the stuff that solves the functional requirements.
Caveat: it's just my opinion.
@dtech said:
<meta http-equiv="Bulletin-Text" content="Just Released: Microsoft Internet Explorer 3.0. Download it Today!"&rt;:')
For complicated reasons that I don't entirely remember, back in 2001 or so, I installed Windows 95 OSR2 on a machine. I then tried to use IE3 to pull down a more recent version of IE.
Guess what? Microsoft's own servers would not let me in, not even to view the main welcome page, as they no longer supported HTTP 0.9 as advertised by IE3.
Fail.
The correct response to P's first question is, "What are you trying to do?" (translation: "Why are you trying to loop over the properties of the object?", but one level of abstraction up.)
This usually reveals (and may prevent) the particular variety of spectacularly misguided WTFery that is in progress, because it makes the person stop and think about what he is doing. This provides an opportunity to explore better ways of doing it, and even ways of not doing it because you can do something else instead.
@Enterprise Architect said:
See the X86 SET* instructions: you can extract individual flags. Also, GCC's compilation of this line (at least with -m32 -Os) is branchless.Indeed.. However, don't lose sight of the fact that there are things in this world that are NOT x86. (And technically speaking, the SETcc instructions extract individual conditions rather than individual flags, but that's purposelessly pedantic.)
@Cbuttius said:
Joel contradicts himself. In one blog he wrote that someone who can program well in C or C++ would easily be able to program well in any language. Later he writes that he needs rapid development and someone who has played with the right toys will be more useful than someone who is a great programmer in theory but hasn't had the experience of that particular toy.
That's not a contradition. If you want someone who can be productive now in a particular language/toolset/OS/API, then someone with existing experience with that "toy" and good skilltalent is better (== more suitable) than someone with experience with other toys and the same level of skilltalent. If the second person works with your desired toy long enough, then he will be as productive with it as the first one, but that "long enough" could be longer than the deadline for a small project.
@eBusiness said:
I wonder why noone has yet come up with the arithmetic branchless solution:
size=(size-6)*(v<=10)+6-(v>22)-(v>51)-(v>68)-(v>117)-(v>145);
return size;
@vyznev said:
@forkazoo said:
/* ugly hack for PCM codecs (will be removed ASAP with new PCMWell, to be fair, "ASAP" in such cases often does mean "maybe within ten years at most, dear God let it be so". So the comment might, in fact, be entirely correct and up to date.
support to compute the input frame size in samples */
Yes, indeed. Far too many people forget that ASAP means "As Soon As Possible", not "In A Very Short Period Of Time".
@Indrora said:
@blakeyrat said:I think what Mr Furry is suggesting is otherwise known as "sabotage." No, it's not a good idea.What I'm describing isn't /sabotage/ its a means by which for people to listen. Sabotage implies permenant and irreprable damage.
@blakeyrat said:
If your communication skills are not up to snuff to explain the problem in such a way that boss-man understands it, then you have two choices:
1) Find a way to communicate to him
2) Leave before the system dies and you're running around in a panic trying to cope with itHow about I put this into perspective. this is the equivelant to your boss having their car keyed (after someone gets paid $50 under the table) when they deny that there's a vandalism problem In the parking lot. its not /sabotage/ its a /conversation catalyst./
@blakeyrat said:
I've had to take option 2 before, but option 1 is far better for everybody involved. Sabotaging your employer's systems to make some kind of point is never the right way to do it, and is probably illegal.
Again, not sabotage
Call it what you will; it doesn't make it (a) ethical, (b) likely to succeed, or (c) career-enhancing. Sure, it will be a "conversation catalyst", but if they know that you did what you described, the conversation will be extremely short:
You: Here's the report/result/etc.
Boss: You're fired.
@BPFH said:
Yep. Office Messenger 2007 R2 does, anyway. It's the first option under "Instant message settings" on the "General" page--"Show emoticons in instant messages".
It's one of the first things I turn off in any instant messaging program.
Could be worse. I remember a time when Lookout Distress would mangle C++ double-slash comments by placing file: in front of them.
Before sending the message, that is.
It caused endless hilarity on newsgroups, as you can imagine.
Without seeming like I'm raining on your parade or anything, but why didn't you just fix all your local machines' IP addresses?
@Renan C# Sousa said:
... and made slavery a much common sentence for debts unpaid...
@morbiuswilters said:
Your signature sounds like it came right out of the mouth of Karl Marx.
Mike Rutherford, actually.