|
MEAT TREAT posted:I can't wrap my head around ASUS servers in the first place Your heart has yet to be touched by their rock-solidness.
|
# ? Jun 28, 2012 19:45 |
|
|
# ? May 17, 2024 14:02 |
|
I came across this today:code:
|
# ? Jun 29, 2012 00:03 |
|
You guys are wrong about condition jumps, anyway. Non-conditional jumps (jmp) is one clock. Conditional jumps are slower but variable; the CPU will try to predict the outcome and prepare to execute the commands it thinks will come next, but this prediction is very complicated.
|
# ? Jun 29, 2012 00:42 |
|
Jonny 290 posted:Your heart has yet to be touched by their rock-solidness. Where did that slogan come from anyways? It seems utterly bizarre
|
# ? Jun 29, 2012 00:57 |
|
CGameProgrammer posted:You guys are wrong about condition jumps, anyway. Non-conditional jumps (jmp) is one clock. Conditional jumps are slower but variable; the CPU will try to predict the outcome and prepare to execute the commands it thinks will come next, but this prediction is very complicated. No, as was convincingly demonstrated, a jmp is not one clock tick.
|
# ? Jun 29, 2012 01:40 |
|
code:
|
# ? Jun 29, 2012 02:29 |
|
I can explain that one! {} + [] is not being interpreted as an object literal plus an array literal. It's being interpreted as a block with no statements, and then an array literal with a unary plus in front. That is: code:
code:
|
# ? Jun 29, 2012 02:37 |
|
I have no clue how the hell to feel about that.
|
# ? Jun 29, 2012 02:46 |
|
Angry. Feel angry.
|
# ? Jun 29, 2012 02:48 |
|
Get angry, then get Coffeescript.
|
# ? Jun 29, 2012 02:51 |
|
yaoi prophet posted:I have no clue how the hell to feel about that. Confused, disgusted, and relieved it doesn't work like you originally thought. Almost like the rest of javascript, except that doesn't work like you think and not in a good way.
|
# ? Jun 29, 2012 02:53 |
|
Qwertycoatl posted:I came across this today:
|
# ? Jun 29, 2012 04:06 |
|
It's really because your REPL is interpreting it as a Program rather than a Statement, and there's an ambiguity between the two. Wrapping it in parens will make it work:code:
|
# ? Jun 29, 2012 04:45 |
|
yaoi prophet posted:I have no clue how the hell to feel about that. See also, the "wat" talk on Ruby and Javascript (caution: heavy on image macros) and this article explaining it.
|
# ? Jun 29, 2012 05:32 |
|
Doc Hawkins posted:Get angry, then get Coffeescript. I, too, react to the problem of hairy syntax and semantics riddled with special cases by adding a preprocessor layer which adds more "convenient" syntax and semantics.
|
# ? Jun 29, 2012 06:00 |
|
Coffeescript owns though. If I were targeting something like a server or a normal desktop environment where I could switch to one of a dozen other languages, yeah, I'd say use something else instead. But what the gently caress am I going to do on the web?
|
# ? Jun 29, 2012 06:09 |
|
How many times have you heard a variation on this statement: quote:Javascript is okay, but what's really holding it back is not having the grammar/syntax/features of $language, which I'm much more impressed by/comfortable with! I've heard at least three. It's like the new C or something. Welcome to the era of ~transpiling~.
|
# ? Jun 29, 2012 06:12 |
|
Being able to write 'for own key, value in obj' or 'for val in array' is really nice though? Like I could give less of a poo poo about braces/semicolons, but list comprehensions/iteration and the 'do' syntax for proper closures in loops fix a lot of the most annoying poo poo about JS.
|
# ? Jun 29, 2012 06:15 |
|
I would use javascript but I evaluate ({} + []) too often to trust using it.
|
# ? Jun 29, 2012 06:34 |
|
yaoi prophet posted:Coffeescript owns though. If I were targeting something like a server or a normal desktop environment where I could switch to one of a dozen other languages, yeah, I'd say use something else instead. But what the gently caress am I going to do on the web? http://opalang.org/ of course!
|
# ? Jun 29, 2012 07:50 |
|
yaoi prophet posted:Coffeescript owns though. If I were targeting something like a server or a normal desktop environment where I could switch to one of a dozen other languages, yeah, I'd say use something else instead. But what the gently caress am I going to do on the web? Coffeescript compiles to good namespacing, is much much easier to read, and just works. What it compiles to looks close enough to what you wrote so you can debug it in console without much hassle. Well worth learning in my opinion, my js codebase isn't great but it is certainly manageable and understandable enough. Furthermore it's the best we're gonna get unless browsers adopt a new standard language for DOM manipulation, which is not really what the web needs right now.
|
# ? Jun 29, 2012 08:08 |
|
Internet Janitor posted:I, too, react to the problem of hairy syntax and semantics riddled with special cases by adding a preprocessor layer which adds more "convenient" syntax and semantics. Unless you're some macho "Real Programmer" who writes machine code in hex, you're already doing some form of this.
|
# ? Jun 29, 2012 09:29 |
|
e: Really, given the context, I have to agree with Janitor. A better solution would be "then don't do that."
Gazpacho fucked around with this message at 10:41 on Jun 29, 2012 |
# ? Jun 29, 2012 10:32 |
|
Vanadium posted:http://opalang.org/ of course! Fun fact: "Opa" is "Grandpa" in German. I will only see that as an old man language. e: Their FAQ covers the various meanings in different languages, pretty much none of which could have any positive connotations in web. bobthecheese fucked around with this message at 10:51 on Jun 29, 2012 |
# ? Jun 29, 2012 10:48 |
|
Vanadium posted:http://opalang.org/ of course! What sadistic gently caress thinks gray text on a slightly lighter gray background is a good idea? I swear this is a slowly growing trend, too, because I've been seeing it more often in the last year or so. Makes me want to set up a fake design blog that's #F8F8F8 text on a #FBFBFB background but I don't think I'm good enough at spinning bullshit to dance on the Godwin line.
|
# ? Jun 29, 2012 14:25 |
|
Munkeymon posted:What sadistic gently caress thinks gray text on a slightly lighter gray background is a good idea? I swear this is a slowly growing trend, too, because I've been seeing it more often in the last year or so. Makes me want to set up a fake design blog that's #F8F8F8 text on a #FBFBFB background but I don't think I'm good enough at spinning bullshit to dance on the Godwin line. It's the coolest new fad in design that makes my life difficult, and I've got only a mild visual impairment. I can't imagine what people with really poor contrast sensitivity think about this poo poo. Seriously you don't need to do 18px black on white or anything but just remembering that not everyone has 20-20 vision would be great, thanks designers. Graphics designers... a perpetual horror Johnny Cache Hit fucked around with this message at 16:06 on Jun 29, 2012 |
# ? Jun 29, 2012 16:02 |
|
yaoi prophet posted:Coffeescript owns though. If I were targeting something like a server or a normal desktop environment where I could switch to one of a dozen other languages, yeah, I'd say use something else instead. But what the gently caress am I going to do on the web? If you're writing a large scale JS application, Clojurescript is good.
|
# ? Jun 29, 2012 16:26 |
|
My place of employment had a "Health Fair" hosted by our insurance company this week. It was pretty stupid since all they did was get your BMI and blood pressure, then give you links to their website. Anyways, after going to their website I find out the following fun pieces of information: Their system only supports 10 character alphanumeric passwords (but the password box takes 15 characters!) It doesn't tell you what is wrong with your password, it just fails if it has a special character or if it is longer than 10 characters. On top of that, passwords are stored in unstalted, unhashed, and unencrypted plain text in their database. Basically the worst possible login security you can imagine. When I did forgot password it actually sent me my plain text password over email. There is a light at the end of the tunnel though. I submitted a little rant on their contact us form saying it was unacceptable to know that my health insurance information is so insecure. I just got a reply, and not a form letter "herp derp I promise we are secure because ..." either. One of their developers wrote a personalized email talking about the new site he's developing and all the new security measures that are being put into place. He did start out saying that the site meets government regulations, but went on to say that obviously wasn't good enough and that the new system would support passwords of any length that have been properly salted, hashed, and separated from the rest of their systems. It's always nice finding developers that actually care, even if the code base they're stuck working on is awful.
|
# ? Jun 29, 2012 16:59 |
|
If you or your employer gave them your SSN or even birthdate then they start to fall under HIPAA compliance and they will get their rear end nailed to the wall if they're audited and their servers aren't up to snuff for security (no unencrypted SSNs stored at rest, no report containing personal biometric data can be made available to your employer unless it's been properly deidentified) . That sounds very similar to the sort of thing my company does, though we go a lot further and take actual bloodwork data, questionnaire data (smoking habits, eating habits, etc) roughly once a year per person and run it through several proprietary risk & trend assessments as well as some openly published heuristics and so on. It's a neat field but there's a lot of rush-to-market shops out there and that sounds like one of them, and handling + reporting on data like that is working with live ammo. At least one guy over there cares, and it's not like your boss now knows your hemoglobin A1C count (largest indicator for pre-diabetes) if all they did was weigh you and so on. But still, unencrypted passwords certainly doesn't inspire confidence.
|
# ? Jun 29, 2012 23:53 |
|
Bhaal posted:If you or your employer gave them your SSN or even birthdate then they start to fall under HIPAA compliance and they will get their rear end nailed to the wall if they're audited and their servers aren't up to snuff for security (no unencrypted SSNs stored at rest, no report containing personal biometric data can be made available to your employer unless it's been properly deidentified) . That sounds very similar to the sort of thing my company does, though we go a lot further and take actual bloodwork data, questionnaire data (smoking habits, eating habits, etc) roughly once a year per person and run it through several proprietary risk & trend assessments as well as some openly published heuristics and so on. It's a neat field but there's a lot of rush-to-market shops out there and that sounds like one of them, and handling + reporting on data like that is working with live ammo. At least one guy over there cares, and it's not like your boss now knows your hemoglobin A1C count (largest indicator for pre-diabetes) if all they did was weigh you and so on. But still, unencrypted passwords certainly doesn't inspire confidence. When I read Frozen-Solid's post I just assumed he wasn't in the US due to HIPAA compliance issues. If he is, I wonder if there's a snitching bonus...
|
# ? Jun 30, 2012 03:50 |
|
Hughlander posted:When I read Frozen-Solid's post I just assumed he wasn't in the US due to HIPAA compliance issues. If he is, I wonder if there's a snitching bonus... I'm in the US, and to be fair nothing really incriminating shows up when I poke around my account. The worst it shows is claims they paid, and to who and a way to reprint my card. It's bad enough that I filled out a few "contact us" forms and made a few angry tweets, but not so bad that I think they're actually violating HIPAA. Either way, they're working on a new site and the dev who emailed me obviously knew what he was talking about. It's enough to appease me until I see the new site launched, assuming it's soon like he claimed.
|
# ? Jun 30, 2012 06:41 |
|
code:
Mistakes this obvious make me lose all confidence in the rest of the code so I ran a search through the code base looking for the pattern ".trim() != null" and found a handful of other cases. I laughed out loud at the time, but the more I think about it I get angry considering how much restaurant work I've done while looking for IT work. How many employed programmers were writing stuff like this all that time?
|
# ? Jun 30, 2012 18:54 |
|
This came up in /r/programming C++ Examples: Returning a Pointer It starts with: -------------- Instead of a regular value or even a reference, a function can return a pointer. You can start to specify this by typing the * operator on the left side of the function's name. Here is an example: C++ code:
C++ code:
|
# ? Jun 30, 2012 21:51 |
|
The real horror is that somewhere, that code is production code.
|
# ? Jun 30, 2012 22:32 |
|
I don't know C++ at all, what's the horror?
|
# ? Jun 30, 2012 22:34 |
|
yaoi prophet posted:I don't know C++ at all, what's the horror? Returning the memory location of a local variable. Probably some other horrors too.
|
# ? Jun 30, 2012 22:38 |
|
yaoi prophet posted:I don't know C++ at all, what's the horror? The code only looks like it works. The functions are returning pointers that reference local variables - when a function goes out of scope, we stop tracking its local variables, and the memory used is on its own. You have no way of knowing if/when this memory is going to get munged later, the behavior is undefined and totally up to the system itself. This can lead to very hard to troubleshoot bugs - the compiler should warn you if you have warnings enabled about doing this. But honestly, it's probably stupider that there is no explanation on the page about the use case for making a function return a pointer! Why bother telling how if the user doesn't know why he would want to do something?
|
# ? Jun 30, 2012 23:04 |
|
yaoi prophet posted:I don't know C++ at all, what's the horror?
|
# ? Jun 30, 2012 23:21 |
|
Aleksei Vasiliev posted:Floating point for a monetary value Floating point for monetary values isn't necessarily a coding horror.
|
# ? Jun 30, 2012 23:22 |
|
|
# ? May 17, 2024 14:02 |
|
yaoi prophet posted:I don't know C++ at all, what's the horror? To expand a bit on the other explanations: Conceptually, at least, in C and C++ local variables are stored on a stack. When they go out of scope, they are popped from the stack. Later, another variable may be pushed onto the stack that overwrites the one your returned pointer points to. While that's easy enough to understand, It's hard to debug since your pointer still points to something. It's just something totally invalid. Due to compiler optimizations it gets even trickier: The variable may have been stored in a register, not on the stack at all; the stack might be pushed and popped at weird times, etc.
|
# ? Jun 30, 2012 23:24 |