|
abraham linksys posted:my only beef is with its mutable api and they're working on adding an immutable/frozen mode (https://github.com/moment/moment-rfcs/pull/2) so that's not gonna be an issue in the future. like i reckon if that feature never comes to pass we'll have a better library within the next year or two take moment's place python is also garbage
|
# ? Aug 18, 2016 04:13 |
|
|
# ? May 25, 2024 15:28 |
|
okay that's really great and your comments were informative as always, but can you now please do a version of what that code might look like were it found in the wild, written by someone who just autocompleted to victory.
|
# ? Aug 18, 2016 04:15 |
|
i mean it's not like alternative datetime libraries are limited to just plangs
|
# ? Aug 18, 2016 04:15 |
|
key difference being that the stdlibs in those languages actually work and are well documented
|
# ? Aug 18, 2016 04:19 |
|
MALE SHOEGAZE posted:okay that's really great and your comments were informative as always, but can you now please do a version of what that code might look like were it found in the wild, written by someone who just autocompleted to victory. just remove all the comments and randomize the variable names
|
# ? Aug 18, 2016 04:23 |
|
JewKiller 3000 posted:just remove all the comments and randomize the variable names yeah not very interesting in retrospect
|
# ? Aug 18, 2016 04:27 |
|
you can't write code like that except by 100% commitment. to phone it in, you'd use C++ with ATL I guess. I'll have to try it, but I never used ATL in my entire life because when I was learning COM, Visual Studio still cost money
|
# ? Aug 18, 2016 04:31 |
|
https://github.com/Luigi30/simdos/blob/master/fat12.x68 this 68k code is an abortion but it's miiiiine and i'm so proud
|
# ? Aug 18, 2016 04:32 |
|
Luigi Thirty posted:https://github.com/Luigi30/simdos/blob/master/fat12.x68 i'm the floppy pointer
|
# ? Aug 18, 2016 04:34 |
|
hackbunny posted:you can't write code like that except by 100% commitment. to phone it in, you'd use C++ with ATL I guess. I'll have to try it, but I never used ATL in my entire life because when I was learning COM, Visual Studio still cost money CComBSTR and CComVariant RAII away a lot of that pain, and it's still awful enough even armed with ATL. I think CComVariant might be parameterized on the VT_ constant the variable holds? can't remember Nice writeup, now do one involving SAFEARRAYs
|
# ? Aug 18, 2016 04:50 |
|
Luigi Thirty posted:https://github.com/Luigi30/simdos/blob/master/fat12.x68 also please keep posting updates in this thread. i think your posts are eventually going to inspire me to get into lower level stuff.
|
# ? Aug 18, 2016 05:12 |
|
Bloody posted:key difference being that the stdlibs in those languages actually work and are well documented the original date and time libraries for java are kinda weird, iirc. they added more of them over time though
|
# ? Aug 18, 2016 05:22 |
|
Bloody posted:i don't understand you e: poo poo, gently caress anthonypants fucked around with this message at 17:28 on Aug 18, 2016 |
# ? Aug 18, 2016 05:33 |
|
Space Whale posted:gently caress finishing a 4 year, in loving EE, to take a pay cut. waaay back there now but i had to reply: the standards for EE coders is also miserable, but you still need that degree for whatever reason. i interviewed for a firmware embedded position. there was no coding screen before the on site. this was the white board coding question: given the signature below, write a function to swap the first element of the array with the last, the second with the second to last, etc. such that the array is reversed code:
they were loving astounded when talked through this in under 5 minutes: (spot all the mistakes i'm not looking at this more than once) code:
they switched to this question after asking about sorting and over several years zero applicants could come up with anything better than an insertion sort, and that only after being guided from a naive bubble sort.
|
# ? Aug 18, 2016 05:45 |
|
hobbesmaster posted:waaay back there now but i had to reply:
|
# ? Aug 18, 2016 06:07 |
|
Lutha Mahtin posted:the original date and time libraries for java are kinda weird, iirc. they added more of them over time though java.time package.
|
# ? Aug 18, 2016 06:15 |
|
i can't write a sorting algorithm on a whiteboard because if i need to sort something, i google "sort <data structure> in <language>" i whiffed on an interview a year ago where i had to
|
# ? Aug 18, 2016 06:24 |
|
hobbesmaster posted:waaay back there now but i had to reply: They're horrible programmers. Also the programming curriculum at my university for EEs is understandably shallow. They take like 2 intro courses Star War Sex Parrot fucked around with this message at 06:30 on Aug 18, 2016 |
# ? Aug 18, 2016 06:26 |
|
It was fun destroying the EEs in my DSP Lab class because none of them could write C worth a drat for the little TI (?) DSP boards we were using They killed us in the prerequisite DSP theory/math class because they had more discrete and continuous time signals classes, but they couldn't implement it digitally for poo poo Star War Sex Parrot fucked around with this message at 06:33 on Aug 18, 2016 |
# ? Aug 18, 2016 06:28 |
|
Wheany posted:i can't write a sorting algorithm on a whiteboard because if i need to sort something, i google "sort <data structure> in <language>" most programmers are so bad that the fact that you understand and admit that you need to look something up when you don't know it probably puts you in the top 25%, and the fact that anyone would get turned down for that in 99% of jobs is hilariously sad because the tech industry has the worst superiority complex
|
# ? Aug 18, 2016 06:29 |
|
Star War Sex Parrot posted:This is why most of our firmware devs arent EEs. most EEs at my school had a minor in CS this meant they somehow passed introductory discrete math and algorithms.
|
# ? Aug 18, 2016 06:34 |
|
triple sulk posted:most programmers are so bad that the fact that you understand and admit that you need to look something up when you don't know it probably puts you in the top 25%, and the fact that anyone would get turned down for that in 99% of jobs is hilariously sad because the tech industry has the worst superiority complex the job was for an ad agency, btw. i understood that i would have been doing python and js development
|
# ? Aug 18, 2016 06:37 |
|
abraham linksys posted:my only beef is with its mutable api and they're working on adding an immutable/frozen mode (https://github.com/moment/moment-rfcs/pull/2) so that's not gonna be an issue in the future.
|
# ? Aug 18, 2016 07:48 |
|
hackbunny posted:I wonder sometimes. I actually liked doing it Forgive my terrible programmer question, but I don't really understand what it's for Like is it a platform independent? Windows only? There's easier ways to create a file so what's the more general use case? Making and manipulating office files? Just windows programming in general?
|
# ? Aug 18, 2016 08:34 |
|
gonadic io posted:Forgive my terrible programmer question, but I don't really understand what it's for windows only afaik, it's been ported elsewhere but only to port applications, it never gained traction. as I mentioned, mozilla applications use COM but through a very different API. of course I picked file creation example for the absurdity of it, to show how a four line script expands into a hundred+ line monster. the general case is, more than controlling applications, extending them: browser plugins used to be activex controls for example (activex being an application of ole2 which is in turn an application of com), things that extend right-click menus for files with sub-menus are com components, etc. controlling applications is a legitimate use case too of course, and yes windows programming in general sometimes because some APIs (e.g. WMI) are only accessible through COM. no one does it in C because you can do it in C++, with plenty frameworks available, you can do it in visual basic, you can do it with old school windows scripting host, you can do it with any .net language etc. Mr Dog posted:Nice writeup, now do one involving SAFEARRAYs never had to deal with the notorious SAFEARRAYs, sorry. I've always been curious if they were as bad as their reputation anthonypants posted:buddy, you should try understanding some of his posts some time sorry but I gotta defend my personal brand: it's "her" posts tia
|
# ? Aug 18, 2016 09:42 |
|
Space Whale posted:So if I have the object Ordinary objects do not have the forEach method. However, if you had an array JavaScript code:
|
# ? Aug 18, 2016 10:18 |
|
Object.keys(o) will return an array of rhe object's keys. Object.keys(o).forEach(k => console.log(o[k]))
|
# ? Aug 18, 2016 11:14 |
|
Lutha Mahtin posted:the original date and time libraries for java are kinda weird, iirc. they added more of them over time though http://classicprogrammerpaintings.com/post/142649999919/javautildate-salvador-dali-oil-on-canvas-1931
|
# ? Aug 18, 2016 12:01 |
|
yeah that's the one i never use because wtf. there's also the one that is some kind of abstract class that allows you to define your own calendar system, which is good if you're like the ulillillia of calendars and need to implement your improved and extended version of the mayan calendar i guess
|
# ? Aug 18, 2016 12:17 |
|
hackbunny you are an absolute star
|
# ? Aug 18, 2016 12:50 |
|
hobbesmaster posted:waaay back there now but i had to reply: you should've used an xor swap
|
# ? Aug 18, 2016 13:35 |
|
hobbesmaster posted:waaay back there now but i had to reply: this kills the array
|
# ? Aug 18, 2016 14:21 |
|
quiggy posted:you should've used an xor swap I've gotten the swap a couple of times in interviews and each time they ask if I can do it without a temporary variable I say yes but I'm not going to and shame them for asking
|
# ? Aug 18, 2016 14:22 |
|
Bloody posted:I've gotten the swap a couple of times in interviews and each time they ask if I can do it without a temporary variable I say yes but I'm not going to and shame them for asking tbf if you're interviewing for a firmware embedded position like hobbesmaster that's the one time an xor swap is actually maybe justifiable
|
# ? Aug 18, 2016 14:32 |
|
not in C, in asm maybe
|
# ? Aug 18, 2016 14:35 |
|
it's basically never justifiable
|
# ? Aug 18, 2016 14:38 |
|
clearly i should've used this macro i only say "asm maybe" because i'm sure theres some retarded architecture where using a tmp is somehow slower than the xors instead of faster like every other architecture. luckily if you can write C someone else has theoretically figured all this poo poo out for you!
|
# ? Aug 18, 2016 14:46 |
|
Bloody posted:it's basically never justifiable i dont disagree but if it's justifiable anywhere it's justifiable there
|
# ? Aug 18, 2016 14:47 |
|
|
# ? Aug 18, 2016 14:48 |
|
|
# ? May 25, 2024 15:28 |
|
since it doesn't involve a goto or longjmp its automatically not one of the worst C macros C codebases that have try/throw/catch/finally blocks are crazy. heres an example that actually explains whats going on which removes 99% of the fun
|
# ? Aug 18, 2016 15:02 |