|
Manslaughter posted:I always thought of typecasting as "I'm going to use my +2 programmer's staff to cast this IWankable into a WankPole" I am going to attempt to engineer a context where typecasting is discussed at work so I can say this!
|
# ¿ Jun 19, 2014 22:35 |
|
|
# ¿ May 21, 2024 00:14 |
|
qntm posted:I've just started work on a new codebase developed by a team which is geographically distributed. I think some of them are in Toronto and some are in Bangalore but I honestly don't know. All that matters is that these developers are not where I am, which mean's I'm not able to physically confront them over JavaScript code like this: I don't know much about JS, what's the horror with the first one... looks like branching on the value of a default argument?
|
# ¿ Aug 23, 2014 22:56 |
|
HFX posted:There is nothing wrong with using XML. Hmm.
|
# ¿ Sep 2, 2014 17:29 |
|
Sounds like a (tiny) throwaway demonstration/test app/spike, what's the horror?
|
# ¿ Nov 7, 2014 02:20 |
|
aunt jemima posted:That should never, ever, be a HTTP 200. I used to work at this company where another team had a product and the web API for it would return 200 with a status/error string even in the presence of client or server errors, I asked why they didn't return 4xx/5xx as appropriate and they gave some long implausible sounding reason I can't remember.
|
# ¿ Dec 10, 2014 21:22 |
|
Karate Bastard posted:A rule of thumb: if you're doing crypto, don't. Or just do it right, like every other thing you have to do. Don't see what's special about crypto.
|
# ¿ Dec 22, 2014 22:16 |
|
You people do realise that humans wrote your crypto libraries right? And that you yourself could contribute code to a crypto library. "This problem is hard to get right so don't do it" sucks. Obviously you wouldn't write a home rolled crypto library for your lovely web app, but you might write crypto if you were writing, I dunno, a crypto library? Note that I didn't look at the specific example, my reply was a general response to a general comment.
|
# ¿ Dec 23, 2014 04:40 |
|
Janitor Prime posted:And it is an invalid response that shows your ignorance on the subject. I'm glad that you completely disregarded all those actual posts trying to educate you instead of mocking you. This is a completely ridiculous attitude. If everyone took your advice there would be no crypto. At no point have I advocated people roll their own crypto libs, I'vs merely stated (admittedly somewhat obliquely initially) that the rule of thumb presented (if you're doing crypto, don't) is bad. Better advice would be to write it correctly, with respect to literature and practical implementation lessons. My personal preference would be that we despookify crypto so it isn't so weird and scary for competent engineers.
|
# ¿ Dec 23, 2014 14:18 |
|
good jovi posted:crypto isn't for engineers, it's for mathematicians Implementation is engineering, and crypto defects are introduced by people doing software engineering. I guess I just feel quite strongly that the development of better primitives and abstractions for helping to not make open crypto a clusterfuck would be better accomplished by not propagating the attitude that crypto is a sacred thing for geniuses, like I guess like multithreading (and probably programming in general) was in decades past. If you disagree then fair enough? Obviously don't write your own crypto lib, but only in the same way you don't write your own database engine, programming language or operating system (i.e., it shouldn't be special). Anyway, sorry for the derail.
|
# ¿ Dec 23, 2014 17:40 |
|
JawnV6 posted:Do your normal standards for software engineering account for sidechannel timing attacks leaking information? I've never really taken that into account. Who should have caught the PS3 signing bug, the implementing engineer or a mathematician auditor? Why don't you tell me what you think?
|
# ¿ Dec 23, 2014 18:15 |
|
sarehu posted:"Don't do your own crypto" does not mean don't write your own crypto lib, it means don't use a crypto lib directly. Honestly I don't even
|
# ¿ Dec 23, 2014 22:00 |
|
Okay shrughes, if it's bad to use an existing crypto library and its bad to write your own, what to do?
|
# ¿ Dec 24, 2014 03:51 |
|
Jsor posted:I think my favorite part is typedefing std::ifstream as ifstream as if it were better than using a namespace. is the typedef in a header
|
# ¿ Jan 13, 2015 02:39 |
|
sarehu posted:You have to be emotionally retarded to interpret that retroactive abortion comment as vitriolic. Linus says emotionally retarded things a lot. Like if someone else said what he said you'd totally be saying it was emotionally retarded. I mean, "retroactively aborted", jesus gently caress is he 14?
|
# ¿ Jan 29, 2015 21:25 |
|
ExcessBLarg! posted:Android isn't bad, at all, if you start off using Android Studio and you restrict your apps to recent versions of Android only. API 16+ (Jelly Bean 4.1) is a reasonable target these days, which is compatible with 88% of the devices in current use. What if you need to use the NDK, does that work properly/nicely with Android Studio yet?
|
# ¿ Apr 14, 2015 01:47 |
|
Are you sure you want to cancel your order? Cancel / Yes
|
# ¿ May 6, 2015 01:26 |
|
Qwertycoatl posted:
whoa, why does this work
|
# ¿ May 15, 2015 22:47 |
|
Qwertycoatl posted:It relies on integer overflow. If you repeatedly square an even number, it will become 0 mod 2^32. If you repeatedly square an odd number, it will become 1 mod 2^32. :O
|
# ¿ May 15, 2015 23:02 |
|
SupSuper posted:http://c2.com/cgi/wiki?StringlyTyped True story, my colleagues and I invented this term while working at a games company.
|
# ¿ Jun 9, 2015 01:00 |
|
Ekster posted:Current management fad not a replacement for competence, news at eleven. How is Agile a fad?
|
# ¿ Sep 26, 2015 11:48 |
|
IT BEGINS posted:Small dev horror. Asked one of our senior devs to pair with the new guy to work on adding a feature to our 'remote' authentication. Asked him to also test drive it or at least cover it so some of the guys that are new to testing have a real example to look at. Sounds like the senior dev has correctly identified the horrors of test-first.
|
# ¿ Oct 21, 2015 01:47 |
|
Ithaqua posted:And? DVCS is absolutely overcomplicated for what some teams are doing. If the team doesn't need to work offline and rarely branches and their existing VCS tools work for them with no pain or angst, why should they change to DVCS? There's way too much DVCS cargo culting happening and it drives me crazy. Here are the cases when DVCS is inappropriate:
|
# ¿ Jan 24, 2016 19:09 |
|
Munkeymon posted:
This would be insanely bad.
|
# ¿ Apr 4, 2016 23:18 |
|
TooMuchAbstraction posted:...why? You can't just say something like that without giving an explanation. Git already does something perfectly sane. It puts standard merge metadata in the file which allows the use of pretty much any merge tool. It has a UI hook to allow invoking a user-configured merge tool. In the default state if there is a merge conflict, the conflicting files are unstaged - this means they will not be committed unless explicit action is taken to do so. The current behaviour for handling merge conflicts is cool and good.
|
# ¿ Apr 6, 2016 21:45 |
|
code:
|
# ¿ Jun 6, 2016 21:08 |
|
In all fairness, maybe it's not so weird after reading more about it, but definitely caught me out earlier in a ruby web service we've inherited.
|
# ¿ Jun 6, 2016 21:51 |
|
I quite like JS tbh.
|
# ¿ Jun 26, 2016 19:50 |
|
eth0.n posted:Declaring that a function takes a function pointer of type "int(int, int)" is not as clearly defined as declaring one that takes type an object of type IntegerAdder. The former can take any kind of function that returns int given two ints, even if that function has nothing to do with adding. The latter requires something which conforms to the interface IntegerAdder. Sure, the compiler can't check that the implementation of IntegerAdder is actually an adder, but the greater specificity still has value. It's a much more obvious error when an implementation of IntegerAdder has nothing to do with adding. Not sure what it is about this paragraph, but to me it actually feels like you're trying to convince me of the opposite of what you're claiming.
|
# ¿ Jul 18, 2016 22:18 |
|
Spatial posted:CSS is a design language conceived by programmers so it's no surprise it's pure poo poo. It's been a couple of years since I used it, but AFAIK it doesn't even have the fundamental layout structure of a grid with column spanning. Or the ability to define colour constants. No biggie, designers don't use colour palettes or column-based layouts right? Haha. Yeah but scss and bootstrap?
|
# ¿ Jul 21, 2016 20:48 |
|
BlackMK4 posted:
Is this actually bad (the comments to not have spacing, rather than the repetition in the HTML itself)?
|
# ¿ Aug 3, 2016 21:04 |
|
Why would anyone want valgrind not to warn about the uninitialised memory read bugs in openssl? They were bugs.
|
# ¿ Aug 28, 2016 03:06 |
|
Is all this scraping not against the ToS for these sites? I understand it for a shits n giggles personal project, but how do businesses get away with it?
|
# ¿ Aug 31, 2016 07:35 |
|
SupSuper posted:- Comparing floating values with ==. What's the problem here? Not sure why they should need an epsilon for these comparisons given the context, maybe I am missing something.
|
# ¿ Sep 13, 2016 21:55 |
|
Yes?
|
# ¿ Sep 13, 2016 22:05 |
|
Like I agree say, 1.2f != 1.2, but 1.f == 1.0 should be legit.
|
# ¿ Sep 13, 2016 22:10 |
|
ulmont posted:Pretty sure both have been posted here before, but helpful links regarding floating point: Article from same stating that floating point ain't magic and sometimes you really do want an equality comparison (as I think was the case in the function that led to this discussion): https://randomascii.wordpress.com/2012/06/26/doubles-are-not-floats-so-dont-compare-them/
|
# ¿ Sep 14, 2016 19:13 |
|
hobbesmaster posted:You know what started this is testing a variable called paramDblValue against a float literal and not a double. Yeah but comparing against 1
|
# ¿ Sep 14, 2016 20:29 |
|
Hahaha perfect horror thread response
|
# ¿ Sep 30, 2016 21:17 |
|
Suspicious Dish posted:it seems like an obvious logical next step but maybe thats just me??? Who would think this wouldn't leak though? It quite clearly states the rationale. VikingofRock posted:Do people really use reinterpret_cast much in practice? I've seen reinterpret_cast for casting (appropriately padded, aligned, endianned) byte data to an array of structs, if you want to avoid a copy. I've seen this done in games where it's been used to load data from the network or disk, like an environment block.
|
# ¿ Oct 7, 2016 19:57 |
|
|
# ¿ May 21, 2024 00:14 |
|
Bongo Bill posted:It's called "stringly typed" I worked in the team that invented this term, seriously. It was hell.
|
# ¿ Oct 12, 2016 08:47 |