|
Use javascript, get yelled at for using the wrong programming language. Switch from javascript, get yelled at for being a programming hipster...
|
# ? Jul 4, 2014 18:27 |
|
|
# ? May 10, 2024 01:40 |
|
eithedog posted:Um... This is the result - seeing that most people do any JS dev without any sort of OO in mind. Oh, I agree. That's why I don't think that quote (or being frustrated with Node's emphasis on performance over everything else) is unreasonable.
|
# ? Jul 4, 2014 20:15 |
|
Strong Sauce posted:Use javascript, get yelled at for using the wrong programming language.
|
# ? Jul 4, 2014 20:40 |
|
Strong Sauce posted:Use javascript, get yelled at for using the wrong programming language. Yes, this is the objection, it's definitely not because some people choose platforms only to be seen using trendy languages.
|
# ? Jul 4, 2014 20:41 |
|
e: I don't want to be part of the problem here
|
# ? Jul 5, 2014 00:46 |
|
eithedog posted:Um... This is the result - seeing that most people do any JS dev without any sort of OO in mind. I'm always curious if my JS code is good enough and readable enough. I have a very unique code style in my JS, and I use it for a lot of large, insane projects. This is my OOP style: https://github.com/magcius/xplain/blob/gh-pages/src/server/server.js This is my non-OOP style: https://github.com/magcius/bmdview.js/blob/gh-pages/bmd.js
|
# ? Jul 5, 2014 01:21 |
|
fidel sarcastro posted:That quote isn't so unreasonable, isn't one of the major problems with Node that it's easy to write fast but hard to maintain code? That's a problem with Javascript more generally. it's a pain in the rear end to do programming "in the large". No real module support or namespacing, weird scoping rules, crippled OO, and annoyingly permissive semantics. Plus the lack of support for doing concurrency and async other than ugly hand-rolled continuation passing. Node is actually surprisingly fast, general faster than other interpreted languages. It can be competitive with a lot of the big compiled ones. Besides, the "right language" for a critical line of business app is the one your developers already all know, for which there's a mature toolchain, and which is performant enough. The right language for your lovely little side project that will decay on Github after hitting v0.0.2 is whatever you want it to be.
|
# ? Jul 5, 2014 02:11 |
|
Sagacity posted:Looks like Go is now the next language for the Rails/NodeJS hipsters to flock to. I wonder when they'll arrive at a language that has a strong type system.
|
# ? Jul 5, 2014 22:45 |
|
ExcessBLarg! posted:So the OP is actually a great post. His comments on Node's terrible error handling is exactly what's wrong with Node when used for non-trivial projects, the kind of stuff that most noders just ignore. Node.js has the worst error handling - but it is .js so what do we expect The hardest part of node.js is making sync handling for multiple async actions, I haven't yet come across a decent library that helps w/ that.
|
# ? Jul 6, 2014 08:00 |
|
Westie posted:Node.js has the worst error handling - but it is .js so what do we expect I've had luck with this library. Takes a moment to wrap your brain around certain things but it works pretty well.
|
# ? Jul 6, 2014 08:21 |
|
Captain Capacitor posted:I've had luck with this library. Takes a moment to wrap your brain around certain things but it works pretty well. async.parallelLimit is what I want. Thank you!
|
# ? Jul 6, 2014 19:22 |
|
I have been doing some coding for minecraft mods, which are usually coded by complete novices who plough through examples until their code does what they want it to. One thing i have noticed more than anything in their code code:
|
# ? Jul 7, 2014 11:06 |
|
TheresaJayne posted:I have been doing some coding for minecraft mods, which are usually coded by complete novices who plough through examples until their code does what they want it to... http://pragprog.com/the-pragmatic-programmer/extracts/coincidence
|
# ? Jul 7, 2014 15:57 |
|
TheresaJayne posted:I have been doing some coding for minecraft mods, which are usually coded by complete novices who plough through examples until their code does what they want it to. To be fair a lot of Minecraft mods appear to involve literal 12 year olds.
|
# ? Jul 7, 2014 17:58 |
|
I wasted far too much time today hunting down a reference issue. I was developing in Solution A, which threw a MissingMethodException deep in our DB layer when installed on a QA machine. Turns out that our main ORM project (home grown, of course) was referencing the buiid output of Solution B, which again had a file reference to the wrong version of the DB layer. The installer was installing the right version then overwriting with the wrong version. Took me FAR too much digging with AsmSpy to find it. and it would really help if people had ever bumped version numbers in anything ever. Oh well, only a couple of weeks left.
|
# ? Jul 7, 2014 19:33 |
|
hobofood posted:I wasted far too much time today hunting down a reference issue. Installers are a terrible idea for anything that's not user-facing. Ideally, you'd have automated builds and releases where this kind of thing would pop right out at you. Binary reference where you should be using a project reference? Build failure.
|
# ? Jul 7, 2014 19:52 |
|
Ithaqua posted:Installers are a terrible idea for anything that's not user-facing. Ideally, you'd have automated builds and releases where this kind of thing would pop right out at you. Binary reference where you should be using a project reference? Build failure. This would be lovely, but my boss not a very smart or forward thinking kinda guy, so the chances of any kind of CI is just thrown out the window. The app isn't actually for users, it's for headless machines and is essentially just a couple of Windows services talking to each other over WCF, which made deployment even more fun. But yeah, the place sucks, the processes don't even exist to suck and it's all held down with arbitrary rules ("Don't use MVC, it doesn't scale", "WebAPI is a complete mess so don't use that either", "A shared Outlook inbox is more than enough for a Helpdesk team of 3 people", "3 Helpdesk/QA staff is more than enough for 18 devs" and "Serialization sucks because it [CPU and memory load] kills web servers"), so I did the whole YOTJ thing a couple of months back and am just working through my notice period before starting a new job with a Gold partner who are paying me nearly 2x as much. Edit: Forgot my favourite feature of the whole job! Visual SourceSafe 6.0 for EVERYTHING. I'm surprised it even supports long filenames. Queen of Beans fucked around with this message at 20:48 on Jul 7, 2014 |
# ? Jul 7, 2014 20:12 |
|
hobofood posted:This would be lovely, but my boss is the boss that doesn't like Serialization because "it [CPU and memory load] kills web servers", so the chances of any kind of CI is just thrown out the window. That sentence doesn't make any sense.
|
# ? Jul 7, 2014 20:25 |
|
pigdog posted:
Sorry, wasn't trying to say that CI requires Serialization, I was calling my boss a stupid dick
|
# ? Jul 7, 2014 20:31 |
|
TheresaJayne posted:I have been doing some coding for minecraft mods, which are usually coded by complete novices who plough through examples until their code does what they want it to. This is the problem of stricter languages, people tend to ward off errors rather than understand them. In java i've also seen people peppering "static" in front of methods to make all the compile time errors go away. Meanwhile in Python, i've seen .encode().decode().encode() to try and keep UnicodeDecodeError at bay i'm unsure of what the moral is, but it's something along the lines of "unless you explain the error well enough, people will cargo cult around the problem. if you can explain the error well enough, why can't you just do the right thing"
|
# ? Jul 8, 2014 00:27 |
|
Yeah, you see this in Rust where people just call unwrap on Result instead of pattern matching and explicitly handling the Err case. If there weren't unwrap, then people would have to explicitly state a failures like:code:
|
# ? Jul 8, 2014 01:11 |
|
I was looking for the documentation of unwrap() and wow... Rust's documentation got a really nice upgrade in quality and quantity.
|
# ? Jul 8, 2014 01:31 |
|
hobofood posted:Edit: Forgot my favourite feature of the whole job! Visual SourceSafe 6.0 for EVERYTHING. I'm surprised it even supports long filenames. Trigger warning! I last used VSS 6 in TYOOL 2008. I cannot believe that anyone is still using that. Did your boss not get the memo that it's been EOL'd?
|
# ? Jul 8, 2014 03:54 |
|
Volmarias posted:Trigger warning! I'm actually surprised that mainstream support only ended in 2012. VSS was so unimaginably terrible.
|
# ? Jul 8, 2014 03:58 |
|
Ithaqua posted:I'm actually surprised that mainstream support only ended in 2012. VSS was so unimaginably terrible. I like to think that someone at microsoft was reminded in 2010 that people still used it, said "oh poo poo, did we ever EOL that thing?" and then got on it. The wiki page said that a patch in 2005 added unicode support, but that was the last time it was updated.
|
# ? Jul 8, 2014 04:13 |
|
tef posted:This is the problem of stricter languages, people tend to ward off errors rather than understand them. In java i've also seen people peppering "static" in front of methods to make all the compile time errors go away. Meanwhile in Python, i've seen .encode().decode().encode() to try and keep UnicodeDecodeError at bay I've seen this in C# where the compiler won't let you return nothing from a function, or use an unassigned value, so people will return/assign nonsensical values to things in unexpected code paths (like the default case of a case statement) to shut the compiler up, when they should be throwing an exception. I've come across some annoying and difficult to track down bugs that had their source in this sort of crap. Maybe the compiler should suggest throwing an exception as a possible solution, I'm not sure a lot of people are aware of it. Edit: In the spirit of the thread and since it's a horror in multiple ways I'll include an example that screwed me over. We had some software that talked to some hardware. There were a bunch of register names and associated addresses. In what was already a horror there was in essence a lookup table for register addresses implemented with a case statement. This code was generated. So you'd have this function that looked like: code:
code:
HappyHippo fucked around with this message at 05:23 on Jul 8, 2014 |
# ? Jul 8, 2014 05:06 |
|
I dont get the pragmatic programmer link.... I get defensive coding but doing something like code:
|
# ? Jul 8, 2014 08:57 |
|
TheresaJayne posted:I dont get the pragmatic programmer link.... It's not defensive coding. These people have literally no idea what they're doing. But they saw the cast in an example, at some point their code started working when they added the cast, so now they add casts everywhere, because casts make your code work.
|
# ? Jul 8, 2014 09:14 |
|
tef posted:Meanwhile in Python, i've seen .encode().decode().encode() to try and keep UnicodeDecodeError at bay Part of the problem is that adding a .encode() on a str object can make a UnicodeDecodeError appear out of nowhere, because Python 2's model is quite insane like that. And unicode and str objects look very similar to human inspection. So unless you understand .encode() and .decode() and what your types are, it's very easy to get confused. The model made itself hard to debug and hard to understand, because trying one thing brings something nonsensical out.
|
# ? Jul 8, 2014 11:46 |
|
Suspicious Dish posted:Part of the problem is that adding a .encode() on a str object can make a UnicodeDecodeError appear out of nowhere, because Python 2's model is quite insane like that. And unicode and str objects look very similar to human inspection. So unless you understand .encode() and .decode() and what your types are, it's very easy to get confused. I didn't understand Unicode for the longest time because Python 2 had polluted my brain with its insanity.
|
# ? Jul 8, 2014 15:44 |
|
Are we still doing those Github links? https://github.com/search?q=viod&type=Code&ref=searchresults code:
|
# ? Jul 8, 2014 15:55 |
|
I did a search for "unsinged", but most of the hits were just copies of a unit test for Clang's error parser.
|
# ? Jul 8, 2014 16:29 |
|
At work I'm designing and implementing a language from scratch. Syntax, opcodes, virtual machine, compiler, everything is totally up to me. The VM must fit in less than 768 bytes of memory. I am become death, destroyer of minds
|
# ? Jul 8, 2014 21:05 |
|
Spatial: Color me intrigued. Can you share any other details? What sorts of programs will the VM need to be capable of running?
|
# ? Jul 8, 2014 21:09 |
|
It's for an embedded radio transceiver that runs off a little battery. Normally there's a host CPU which controls what it does, but having user code running on the transceiver means you can power the big ol' CPU down and allow the transceiver to run autonomously, giving you longer battery life. The language allows you to control the state machine of the transceiver, send/receive packets, do arithmetic operations, read/write memory, wait on hardware interrupts, control GPIO pins and the like. You can also put the transceiver to sleep, cause some code to run when a packet is received, all sorts of cool things. e: I say this in the present tense, but... Spatial fucked around with this message at 21:47 on Jul 8, 2014 |
# ? Jul 8, 2014 21:22 |
|
That sounds really fun actually. Take it to the embedded programming thread, it doesn't belong here until you've hosed it up properly.
|
# ? Jul 8, 2014 21:50 |
|
Do the VM and user code have to fit inside 768 bytes, or do you have more flash space for code and that budget is strictly your working RAM? Either way you might find yourself inclined to apply Token threading and a simple stack VM to keep your code as dense as possible.
|
# ? Jul 8, 2014 21:52 |
|
I'm tangled in this mess where I have to use PHP, some lovely MVC that my new boss rolled on his own, and a decently complex third party API to send (essentially) spam emails. That's not even the horror, even though it is a horror. The horror is that this third party requires that all the objects I create in their system have a unique name. It's not for security or anything, so it sounds like a job for uniqid(), right? Nope. quote:Warning If you call it more than once too quickly, it will return the same "unique id."
|
# ? Jul 8, 2014 21:57 |
|
Spatial posted:At work I'm designing and implementing a language from scratch. Syntax, opcodes, virtual machine, compiler, everything is totally up to me. Base it on this(Minimal CPU that will fit in a CPLD) - only 4 opcodes to write for!
|
# ? Jul 8, 2014 22:01 |
|
|
# ? May 10, 2024 01:40 |
|
Spatial posted:At work I'm designing and implementing a language from scratch. Syntax, opcodes, virtual machine, compiler, everything is totally up to me. Brainfuck, please! Mogomra posted:I'm tangled in this mess where I have to use PHP, some lovely MVC that my new boss rolled on his own, and a decently complex third party API to send (essentially) spam emails. It's not a GUID generator, that's for sure. It returns a hex representation of server time, which, after compiling it, pauses for a microsecond or some poo poo like that so each call within that box returns a different result. For what you want it to be, it's unique enough. But since you're that obsessed, array_rand a salt from a list and hash it or something.
|
# ? Jul 8, 2014 23:00 |