• ray10k (unregistered)

Not sure if Derrick is just on the Spectrum somewhere, or if he's just incompetent, tbh.

• P (unregistered)

Nobody has told him the sun will rise tomorrow. Shouldn't we specify it precisely?

• Mike (unregistered)

@ray10k: dou you mean that Derrick is more at ease with a computer with a rubber keyboard and BASIC keyword printed on it?

• bvs23bkv33 (unregistered)

god is real unless explicitly declared as integer

• (nodebb)

Ok, but how the heck can you get any rounding issues just by casting any int value to a float? Is the backend returning some arcane almost, but not entirely unlike count, which is 4.999997?

• P (unregistered) in reply to Applied Mediocrity

Ever heard of floating point range? Single and double precision only has 24 and 52 bits of precision. Anything bigger than that will incur a loss of precision.

• Anon (unregistered) in reply to Applied Mediocrity

(Integer)4.999997 = 5-ish.

Nope. You're right. Doesn't work. We need to invent a new numeric type that can hold an 'ish' flag.

• anon (unregistered)

Oh, little Bobby Tables writes for The Daily WTF now.

• (nodebb) in reply to P

Right. JS (the most used frontend these days) floats are 64-bit. That means 2^56+1. I'm having hard time imagining where any sane/useful count value could be that high. Either way, the 4.99997 example (far from even 2^24+1) made me think that the backend itself is vomiting incorrectly-typed value. While Derrick is clearly the WTF for any other reason, my first thought was that "count" might be some technomagically calculated value (probably with divisions) and therefore not "count" at all.

• RLB (unregistered) in reply to Mike

I'm both; Derrick is just thick.

• (nodebb)

I was going to comment, but the article is way too imprecise.

• oh come on (unregistered)

The article is written in a way which suggests that using and old phone and preferring Notepad as IDE makes you a bad programmer.

• Little Bobby Tables (unregistered) in reply to Applied Mediocrity

The alternative explanation is that the story is an embellished and exaggerated account of what actually did happen, which is, for example: the integration metadata was generating a data item of type "text", and so the actual data then needed to be unnecessarily cast to integer in the app before it could be used. And then on the second iteration it was generated as "float". Probably find that it was not the actual values being passed over as 4.99997 or whatever that alerted Matt to the situation so much as him inspecting the integration component as generated by Derrick and finding this field with a type of "float".

That's what I would have done, knowing that Derrick's work is usually a bit flakey and in need of careful checking before use.

• (nodebb) in reply to oh come on

+1 If someone (like an employer) wants you to have a smartphone, that's good enough reason not to have one. Ditto on Notepad.

However, programmers who prefer Notepad are usually good programmers. (I, OTH, could not live without an IDE.) That's not the case here - Derrick was probably just put off by the complexity of a real IDE.

• Andrew (unregistered)

Let's count on Derrick:

float Derrick = 4.99999997f;

• eth0 (unregistered)

Maybe Derrick is the visionary inventor of the fractional click. Maybe in the future we'll see something like DO THREE QUARTERS OF A CLICK HERE TO WIN!

• Moss (unregistered)

I don't believe for a second that anybody would use notepad. Notepad++ or other text editor, maybe. But not notepad. Forget syntax highlighting or code completion. It doesn't even have an undo stack. You get to undo only the last thing you did. No sane person would be OK with that.

• Jaime (unregistered)

Seen in code checked in yesterday: if (ABooleanVariable.ToString() == "true")

• (nodebb)

Management material for certain!

• Pietro (unregistered)

"Just one last thing... those count fields you set as integers, should be set as unsigned integers"

"AGAIN! you should specify these things precisely!!!"

• Bill P. Godfrey (unregistered)

Next Week, phone numbers stored as integers.

"They're numbers!"

• Anonymous') OR 1=1; DROP TABLE wtf; -- (unregistered)

The phone is not a WTF at all. If the company requires 2FA (excellent!) and the employee does not have a suitable device, then the company should supply the employee with such a device, which is exactly what happened. This could be a smart phone or a single-purpose fob device. If the 2FA is using a TOTP or HOTP algorithm such as with Google Authenticator, then it doesn't even need network connectivity, and the phone could be kept in airplane mode all the time.

Now if the 2FA required network connectivity (e.g. push notifications from Duo), then maybe the tinfoil hat-wearing crowd could make an argument that this violated their privacy by being able to track them. But even then, they could keep the phone in airplane mode or off except when they needed to authenticate.

• Sole Purpose of VIsit (unregistered)

Surprised nobody posted it, but here goes ...

0.999997th!

• (nodebb)

• James (unregistered) in reply to oh come on

An old phone is okay (though the reason stated in the article is moronic), but notepad isn't even a decent text editor.

• James (unregistered) in reply to Applied Mediocrity

I'm using a "tool" at work that when trying to read an Oracle number(22) column as an integer and write it elsewhere as a string results in a floating point number in scientific notation with no resemblance to the source number. This column only contains integer values of four decimal digits or less, but when set up the "tool" to read the column as a double it works fine.

• Just Me (unregistered) in reply to Bill P. Godfrey

I'm working on a 15+ year old project that DOES store phone numbers in numeric fields (country, area code, local number). Client-sidie code uses the country code to figure out how long the area code should be and left-pads with the '0' character. Country code and area code are used to figure out how long the local number portion should be, and left pads with '0'.

• Shut the fuck up (unregistered) in reply to oh come on

Shut the fuck up

• jay (unregistered)

You don't need an IDE if you have the system library memorized.

• Anonmouse (unregistered)

I don't know, I for, most of my career have been a full-stack web developer and I have mostly been using windows Notepad to write front-end code because I have found the auto-formatting of most editors just got in the way and slowed me down. Then I upgraded to TextPad and later to NotePad++ which added syntax highlighting and some other features I wish my current employer's obscure framework clone of Eclipse would do but doesn't.. As for the flip-phone, hey that's a good idea, no tracking, no annoying beeping of my phone in the middle of the night when people email or Facebook message me, maybe I should revert to one of those...

• (nodebb)

Does a flip-phone actually prevent any kind of tracking, that wouldn't also be prevented by simply not using the smart features of a smart phone?

You're still connected to a network, which gives away the location. And phone-calls, SMS can always be spied upon by public agencies.

You can be tracked just as easily by the government with a flip-phone, but tinfoil hat people are strangely (/s) not very rational about how they evaluate risks.

• Anon E Mouse (unregistered)

Number vs Integer... never mind computing, this sounds like someone who missed at least a few lessons in basic math.

• Int vs Float (unregistered)

Seems clear enough to me that the click-tracking report added up 1.0 a bunch of times, leading to, let's say, 100.0 clicks over let's say 20 minutes. Then when they wanted to know how many clicks per minute, 100 / 20 would come out 5, but 100.0 divided by 20 was 4.999997 or whatever.

Preferring bog-standard Notepad (not Notepad++) as your development IDE makes you, at the very least, a woefully inefficient programmer. No multiple synchronized buffers? No finding all references in the entire codebase or going to the definition with a three keystrokes? No live syntax checking? No on the fly API docs? No jumping right to compile errors? No auto-indent? Still using Notepad by choice means you're too crusty to get over the learning hump for a new tool so you stick to hammering nails with a wrench.

Preferring a flip-phone says nothing about your programming skills, but might mean that you're well suited for COBOL.

• Jordan (unregistered)

Speaking as a programmer with >40 years of experience...

I use a flip phone, because it gets several times better battery life, because it fits in my pocket with zero risk of damaging the screen, and because I can answer the phone by flipping it open and make calls by opening it and typing a number.

I don't use Notepad, because I don't do Windows programming. All of my work programming is on UNIX, and there I use vi. Vim, actually, but with syntax highlighting turned off because it annoys me. Some of the features of an IDE would be nice, but it drives me insane when my typing habits from one environment don't work right in the next environment, so if the IDE can't handle C, JavaScript, Python, sh, Makefiles, et cetera, and be universally available across Solaris, Linux, cygwin, et cetera... I'm not interested. I suffer through a few IDEs because they are the only realistic way to use a few environments, but I'd really rather they could figure out a better integration with generic tools.

• (nodebb) in reply to James

Well, it makes sense that an Oracle number(22) is interpreted as a float, because it IS a float. As integer it would have to be defined as number(22,0) or simply as integer which Oracle maps internally to number(38,0).

• Little Bobby Tables (unregistered) in reply to sizer99

Came back from a couple of weeks onsite with a client, who provided me with a company laptop on which to attend to some project issues.

"So what do you all use for a text editor round here?" I asked, hunting through the available company software on its install drive.

"Notepad of course. Du-uh," came the reply. "Mind, the show-offs here use Eclipse."

Yeah, I'd be okay with Eclipse, but for the fact that it is not straightforward to work out how to get it to present files in word-wrap mode.

• Tom (unregistered)

Just give me a wired landline dailphone and I will only edit my code in edlin. If it ain't broke... don't fix it...

• Andrew (unregistered)

Or just maybe Matt is a poor communicator. Seemingly he was making incremental changes on the fly split across multiple emails, chat and calls without consolidating them into 1 clear set of requirements while Derrick is putting out other fires. Maybe Derrick is doing 17 back-to-back online trainings on not making offensive jokes in the office which have to be done today because he's put them all off because of work priorities that would otherwise result in shouting . It's unreasonable to expect that everyone has the same visibility of "the bigger picture". Maybe there is a particular reason which Matt doesn't have visibility of why Derrick would increment with a real number instead of an integer given available time and other priorities. Maybe it is reasonable to assume that you would preserve the detail in the back end and format (round) it in whatever template you are using.

• eric bloedow (unregistered)

reminds me of a classmate in a college programming class, who used an alphabetic field where he had been SPECIFICALLY TOLD to use a numeric one...

• (nodebb) in reply to Andrew

Easy, Derrick. There is no need to be upset :)

• Neveralull (unregistered)

The real WTF is thinking someone with no previous experience can become a full stack software developer with just a little bit of mentoring. Instead, hire someone with a college degree in computer science. How can you expect someone to just magically know the different data types, machine representations, and consequences of conversions, binary computing, different number bases, and computer-to-computer communication of values?

• (nodebb) in reply to P

There is a song about that, from Annie. it should be valid for few more years, okay, eons.

• (nodebb) in reply to Neveralull

The real WTF is thinking someone with no previous experience can become a full stack software developer with just a little bit of mentoring.

My thought exactly long before I've finished reading the story to end.

• (nodebb)

Agreed. Now, we have hired a new grad with no experience to take on a technical role through a mentoring approach, and had it work out well, but that required training on one (1) specific ETL tool, and SQL. We weren't trying to teach him the whole field of software development, or computing basics. In fact, becoming familiar with our data model was the longest and most complicated part of the process, which is as it should be.

Addendum 2019-10-30 03:32: Oh, actually it was two ETL tools in the end, because for a while we pursued a different one for a major project. But it didn't work out in the end and we dropped the other tool with relief.

• (nodebb) in reply to Bill P. Godfrey

That's nonsense, everybody knows that phone numbers should be stored as floating-point.

If you disagree, give me a call at +4.915e13.

• fintux (unregistered) in reply to Just Me

That would totally fail for Finland at least: the area code length varies, as well as the local number. Due to historical reasons, the country code is three digits, and the area code always starts with a zero. If you dial with the country code, you'll need to drop the zero from the area code. This is a bit complex, but it's there to keep the number lengths more reasonable, while still being able to tell apart any area code from a local number (+358... -> full number, 0... -> full number; anything else -> local number). There's not a good way to store the number in any way as a "country + area + local" format, though, for these reasons, without having detailed knowledge of how the number system works. Although the local numbers are almost useless as they can only be used on land-line-to-land-line calls, which almost nobody does these days...