|
ShoulderDaemon posted:In Haskell, this is broadly how the order of operations actually works, because return is actually a value-lifting monad constructor function and function application has higher precedence than any infix operator. Working on proprietary legacy software has made me code with such paranoia about the compiler loving up now that I'm not sure if I can ever be as fast as I used to be.
|
# ¿ Apr 3, 2008 20:06 |
|
|
# ¿ Apr 28, 2024 23:59 |
|
fansipans posted:Ugh... why is this page taking forever to load?!?!?
|
# ¿ Nov 3, 2008 03:55 |
|
Ryouga Inverse posted:To be fair, I'd be pretty pissed off if I had both sexes and you forced me to pick one.
|
# ¿ Jan 27, 2009 21:09 |
|
Avenging Dentist posted:Or that they expected you to write a simple parser instead of using a regex. Also, I think that regex should be treated like a magiceye picture and perhaps it's all a cruel joke and you get goatse'd.
|
# ¿ Feb 13, 2009 07:09 |
|
Every time I see all those Java WTFs brought from some government programmer, all I have to imagine is how horrible the C/C++ version of that would become and my brain crashes and reboots.TRex EaterofCars posted:You could do it with CGLIB or ASM.
|
# ¿ Feb 24, 2009 18:49 |
|
Ryouga Inverse posted:What exactly is it about the for-switch loop that causes it to spread so widely? code:
|
# ¿ Mar 17, 2009 20:09 |
|
Dijkstracula posted:But we're talking about languages, independent of any real-life machines. It's what the grammar can express that we're interested in, and not technicalities like sizeof(void*) or memory addressibility. Regardless, none of this helps me get porn to my computer faster and is thus meaningless.
|
# ¿ Apr 13, 2009 18:15 |
|
scanf("%s",f);printf(f); certainly has a format string vulnerability though. But in that context, no, none.Unparagon posted:pointer mishaps and SQL abuse
|
# ¿ May 4, 2009 22:01 |
|
rjmccall posted:2. The import system lacks shortened qualified import, which turns name collisions into minor catastrophes (because everyone uses prolix package names), which means you see some really silly workarounds like Swing's J prefix on every single class in the library.
|
# ¿ May 14, 2009 19:08 |
|
Vanadium posted:It needs to plug the type T into the array type at some point so RTTI can proceed to ask for the array's type. Which does not work if T gets erased.
|
# ¿ May 18, 2009 17:02 |
|
Mustach posted:Gradian: The GNU radian
|
# ¿ Jul 24, 2009 16:36 |
|
Avenging Dentist posted:A real man would use the GCC frontend with LLVM to compile to (optimized) C and then compile with the old-n-busted compiler you've got. For writing embedded poo poo that only fits into maybe <128KB of total memory, the complexity / legibility of the code isn't as big of an issue as it would be for much larger systems - there's only so much code you can write in that space (unless you get into awesome mutative poo poo like Synthesis OS, but 128KB hardly has room for a process scheduler). With that little bit of space you're not exactly about to write a TCP Vegas implementation or anything for your tiny web server. On the other hand, I've usually resorted to just going with straight assembly in those situations, which negates the point of LLVM / compiler usage anymore. If you're working with microcontrollers and really small CPLDs, you're probably better off staying with assembly rather than C if you're doing anything serious, old, and proprietary as gently caress. I dunno, writing poo poo just to keep it aesthetically modern when it's targeting completely outdated platforms that nobody cares about seems like a waste of time to me. And I'm someone that loves to tackle poo poo just for the sake of flexing my kung foo.
|
# ¿ Jul 25, 2009 06:28 |
|
Incoherence posted:Another way to make people crazy: if you ever have an opportunity to write a 4-level nested loop, use the variables i, ii, iii, and iiii. I kinda miss the simple elegance of mathematical programming loving enterprise Java
|
# ¿ Aug 11, 2009 16:30 |
|
Flobbster posted:I like that the helper function they wrote to handle the null string case requires about twice as much typing as the expression itself.
|
# ¿ Aug 20, 2009 15:16 |
|
Ryouga Inverse posted:Yeah, checking in commented out code is terrible. You're using source control for that reason, just take it out.
|
# ¿ Sep 11, 2009 16:53 |
|
shrughes posted:It's always weird to read things like these, go "WTF?", and then remember how most people still use revision control systems. Ledneh posted:I tend to agree with you, but as the guy who does a lot of the team's source control stuff, a message to my team: please god just use block comment constructs, I don't care if it's /* or #if 0, just don't use // everywhere If you're using Java at work though, you probably have bigger problems to fry than how code is block commented out... like fighting the deep-seated urge to make a noose out of your belt every day. Ryouga Inverse posted:Don't check in commented out code because you're half done with it. Check in only code that builds. fletcher posted:Three bear continuous integration system
|
# ¿ Sep 12, 2009 02:42 |
|
shrughes posted:See, if it's under construction, it should just go in some private branch. Why don't you use a separate branch for every unit of change you're working on? Oh, and as mentioned, not everyone has DVCS. Hell, we just moved to Subversion last week. For smaller teams with few dependencies per contributor in the first place and everyone doing work at work really, DVCS is not of much use for us.
|
# ¿ Sep 13, 2009 18:44 |
|
mr_jim posted:I don't know if this has been mentioned yet, but I just found out that according to the C standard, a[i] and i[a] are equivalent.
|
# ¿ Sep 18, 2009 03:53 |
|
Dijkstracula posted:Fortran's array indexing, barring specifying index ranges, isn't that different than C's. You certainly can't do i[a] in Fortran, so I don't know what you mean.
|
# ¿ Sep 18, 2009 05:51 |
|
I'm going to just put out a minor coding "horror" I used to try to write in C when I was just starting out as a wee lad.code:
cliffy posted:Taking unfiltered user input and using it as an xml tag. Strings starting with numbers? No problem! Spaces? Throw them right in! Recently, I wound up having to submit escaped / wrapped XML to a web service call because the visual programming language I've been working on sucks at arbitrary length "arrays" (they don't exist - everything's a string!) and parameter argument names are static and would have to be written in the rough coding equivalent of: (int,string,string,string,string,string) foo(arrayElem0,arrayElem1,arrayElem2,arrayElem3,arrayElem4...) {//dostuff} So the web service provider gave us a new call that let me take the XML I'd have given to the other call and now it looks like... <wrappedrequestdata> <requestdata><blah attrib="fuckmejesus" /></requestdata></wrappedrequestdata> We managed to make XML-RPC even less readable through this process and take up quadruple the bandwidth (and about 25% more memory on both the client and server). Sadly, this isn't the worst case of inefficiency in our system. I've tried to write out an EBNF for the visual language and all but every time I've looked at it, it just made me sad that I've spent 4 years of my life working on trying to improve this poo poo. I've gotta get out of this poo poo or actually make it better, ugh. loving proprietary software with no user community because of paranoid customers that refuse to ever share code.
|
# ¿ Jun 18, 2010 20:53 |
|
BigRedDot posted:You gotta be sure. Speaking of which, I had to integrate some stuff to a library where the methods names could change while the general boilerplate patterns were identical, and I did some analysis and found it's basically a query language in its idioms and dataflow model. Turns out it was taking a SQL database schema and generating methods according to the schema as it walked the tree and presented that to me as a client-side library. I had created a declarative language for query data to perform the integration, so basically here's what it did in the end: 1. I parse user inputs, which I defined as a declarative query language with hierarchical elements that looked a lot like CSS 2. I generate intermediate code to walk library and object graph of the API as compile-time validation (well, pre-processed because by definition it couldn't be compiled in our system - we had no choice but to do dynamic, but I could have easily converted to a compiled language) 3. Client-side library turns it into SOAP under the covers 4. Receiving server turns SOAP into its own intermediate language to move between a procedural library it exposed to a query language 5. Turned it into different SQL variants depending upon db backing The language I wrote up is apparently the only one that can handle all cases of customizations to the database schema because it's dynamic, and almost everyone that uses the server-side software has custom Java code written by consultants at $250+ / hr because nobody hires full-time developers to do this poo poo in reality. I've gotta get out of enterprise software somehow
|
# ¿ Aug 12, 2010 18:40 |
|
That won't really work in Links, my browser of choice.baquerd posted:Any advice to polish this guy further? I've gotta quit my job. It's not that far-removed from what keeps me from writing code every day
|
# ¿ Aug 31, 2010 02:05 |
|
I thought the for-case pattern starts becoming valid when you start running things out of sequence like in a series of random tests and may be useful to show that they're different test cases with so much test coverage of inputs:code:
|
# ¿ Nov 24, 2010 22:58 |
|
NotShadowStar posted:The challenge is on: somebody find a blog post containing somebody bitching about this limitation. The real ultimate horror will have been found.
|
# ¿ Nov 30, 2010 23:08 |
|
Ithaqua posted:Anyone who does something like that in any language should have the living poo poo beaten out of them.
|
# ¿ Jul 12, 2012 22:18 |
|
I thought a lot of the point of HAML was mostly about making really drastic structural changes to HTML (re-indenting and pivoting about tables, for example) easier than with most templating languages. I could imagine using it for writing out some HTML shorthand for a quick layout in the early stages and then when I'm done iterating through different designs I'll use an actual templating language like I dunno JSTL or Jinja or whatever.Flobbster posted:I'm not big on Coffeescript for the same reason, despite the positive things I've heard about it. I don't find Javascript that difficult to express myself in. I haven't dived too far into the latest version of Rails yet but when I created a placeholder project and noticed that it had Coffeescript assets by default, it made me a little sad.
|
# ¿ Jul 13, 2012 15:28 |
|
I didn't realize that we'd move on from emacs vs. vim wars to graphical text editors vs. console text editors, but I suppose this religious discussion is rare enough. I use vim bindings because I hate using the mouse for exploring code, but for exploring a visual space of some sort I'm all about mouse controls. I'm just terrible at keybindings for my IDEs and editors for compiling because switching between OSes and environments frequently for over 15 years has permanently damaged the part of my brain that can learn new keybindings.
|
# ¿ Oct 13, 2016 20:47 |
|
Always Be Considering (offers) should be the mantra for ambitious folks. At the very least, interviewing skills are not the same as work skills. And lastly, it might be painful but you may have to ask yourself how you got lumped in with Bad Engineers and do what you can to avoid that situation again. In most cases, you should be able to do a 9-to-5 easily enough while taking time off for some interviews or to work on side projects.
|
# ¿ Oct 14, 2016 21:43 |
|
I didn't read that statement as a judgement for your situation as much as commentary for others. I've seen plenty of decade-long projects with terrible code exited successfully because the executives were well-connected enough to get the company sold to a sucker buyer somewhere. I'm including very well known tech entrepreneurs supposedly known for "quality", not just some small-time whatever software companies. I've seen companies with at least 4 total re-writes of the flagship software manage to plod along after small fundraising rounds and/or lobbying, too. If companies like Theranos can survive for years with basically a non-functioning product we can only guess how long useless companies can survive from our vantage points as employees far from the C-suite or board of directors. Edit: to contribute a coding horror, I didn't realize until after I got off a whiteboard I wrote out a coding horror... O(n) space algorithm, O(n log n) time. It could have been done without pre-sorting anything in O(1) : O(k), k being a small constant. Ugh necrobobsledder fucked around with this message at 23:04 on Oct 14, 2016 |
# ¿ Oct 14, 2016 22:59 |
|
taqueso posted:The algorithm is run once (1) each time it sorts a list. Thus it is O(1). I'm loving the idea of Donald Trump coder as a gimmick Twitter account
|
# ¿ Oct 15, 2016 03:54 |
|
The thing that bugs me about bank security is how they can get away with so many bad password rules for retail banking sites while everything after that point (until it reaches some 45-year old COBOL program) is second in paranoia only to DoD standards for encryption and security. It seems extremely short-sighted and hypocritical to be so tight on security in places perhaps less susceptible to massive attack vectors.
|
# ¿ Oct 19, 2016 16:15 |
|
Then again, most of the population has piddly little bits of cash in their accounts so maybe for retail banking it's more cost-effective to keep PEBKAC problems down than to risk millions of $150 balances to hackers. Most of the big credit card and bank heists have been conducted against their internal networks rather than Internet endpoints. A liberal interpretation of Jython I suppose.
|
# ¿ Oct 19, 2016 17:36 |
|
Biowarfare posted:i've had a few methods in code that was handed to me that will sometimes work if you suppress errors and run once or twice I have no idea where that kind of call pattern makes sense outside anything to do with real-world user inputs, really noisy system events, or a process experiencing critical system failures.
|
# ¿ Oct 21, 2016 22:02 |
|
I don't see how that's unique to game dev whatsoever. You see the same with enterprise bullshitware software even where you deliver a product half the time just for a press release to get some customer engagement and even if you literally cure cancer by running your software they'd take about 4 weeks minimum before they even saw your software in a real-life demo situation. So in that case, it's fine to "release" some software as long as you have sufficient time to fix it before it actually is used anywhere. You don't get second chances much with App Store based releases of course, though.
|
# ¿ Oct 24, 2016 17:47 |
|
String conversions are strange, but this is consistent at least I guess? +(100 + "e-2") -> 1 (number) +(100 + "5") -> 1005 (number)
|
# ¿ Oct 24, 2016 19:18 |
|
Bad software being so common and written by people that never wanted to write software (most EEs) is why I left embedded software. Thanks for the reminder.
|
# ¿ Oct 26, 2016 14:26 |
|
If you're messing with configuration files, you should be using some actually known configuration file format with some parser libraries or something like Augeas that can convert to and from different formats for whatever data structure your abominable program is using and so that you can define a grammar of some sort.xzzy posted:Working with puppet for 5+ years has trained me to always leave a comma after the last item in a list. The only effect it's had is making me painfully aware how many languages/parsers freak the gently caress out when you do that. I also saw someone argue that it makes it easier to write templates without needing to use a join function. However, I think there's no templating system I'd ever use in production that won't support using a ubiquitous foo.join(",") syntax that's easier to read than something like for(e in foo) { e + "," }
|
# ¿ Oct 27, 2016 18:05 |
|
I summarize it as "Unix timestamps do not address all the problems in this article and the follow-up article" This doesn't mean that everyone should go crazy and use protocols like PTP but if you know that Unix timestamps aren't sufficient then you should be able to articulate where it falls short for your use cases. For what I've been working on, trying to address accuracy and precision in timing within even a millisecond is hard to do on commodity commercial compute systems because virtualization basically ruins everything, NTP's correction systems can make your accuracy look real wonky, and everyone addresses flaws in timekeeping systems differently (AWS and GCP do not handle leap second adjustments exactly the same, different NTP servers available implement yet other ways). Then there's issues with most programs not using monotonic clock syscalls for externally visible code (see: log files v. internal timers) so I can't rely upon most programs for their reported timestamps when it comes to accuracy although protocols typically address precision ok enough for within a few milliseconds.
|
# ¿ Oct 29, 2016 19:33 |
|
Time being politicized is also what makes it a horror. Daylight savings time changes by congress, for example, and especially just the names of months of the year back to ancient Roman times all leave their mark upon the world for a long time. If you look at all the years and dates Oracle supports (the database) they include pre-Gregorian calendars, lunar calendar (different civilizations' like Cherokee vs. Chinese), and I think even a goddamn Mayan calendar. Someone wanted that and Oracle felt like they were worth writing that crap for evidently. I can only imagine who the hell wanted these calendars in an RDBMS of all places.
|
# ¿ Oct 29, 2016 22:31 |
|
|
# ¿ Apr 28, 2024 23:59 |
|
It looks like literally all of those dependencies are to test that constant across a range of browsers. Maybe the point of the package is to show the horror that is JS?
|
# ¿ Nov 2, 2016 02:48 |