|
When I used to work in the build department, I inherited some real doozies. The build scripts were giant shell scripts running under MKSTools. Probably half of the code we compiled was generated by a process I won't pretend I even came close to understanding. There was a lot of necessary complexity because we built for a shitload of different platforms, but one thing really stuck out. The guy who wrote the bulk of the build scripts really wanted inheritance in his shell scripts. In order to accomplish this, the script searched through the 'parent' shell script for a particular line (not some kind of obvious comment delimiter like "#---THIS IS A DELIMITER---", just another line of a shell script), then took that line and the next 50 or however many, and piped it to a file. He then sourced that file, deleted it, then called functions that the now-deleted file had. It must have taken me a week to figure that poo poo out. And he did it in like four places.
|
# ¿ Mar 27, 2008 21:15 |
|
|
# ¿ Apr 28, 2024 22:06 |
|
Drx Capio posted:
yep. to my way of thinkin', there are times when code duplication is just fine, considering the alternatives.
|
# ¿ Mar 27, 2008 21:49 |
|
ashgromnies posted:So basically he wanted subroutines? I'm not an expert bash scripter(I just use it for automating things I do all the time) but from what I understand, couldn't he just write out separate shell files containing the code block he glommed and just call those? Or does using source give the functions access to lexical variables? He wanted inheritance so he wouldn't have to duplicate code. I would imagine he could have separated out the stuff he wanted to share and sourced it from both files, but he was clearly much better at shell scripting than I am, so maybe there's some subtlety I'm missing. And yeah, it was pretty ingenious. But so much wasted time could have been saved with a few simple goddamn comments giving me some kind of idea that he was doing this very tricksy thing.
|
# ¿ Mar 27, 2008 22:51 |
|
nebby posted:My god. I haven't been in here in weeks, and the first thread I open you guys are still making fun of me... I'm.. speechless. When it comes to mocking inane bullshit, we've got pretty long attention spans.
|
# ¿ Mar 29, 2008 06:52 |
|
Z-Bo posted:I think you are completely missing why your blog posts were so epic and are seared into our brains: You were mentored by Charles Simonyi, and yet completely misrepresent his position on intentional programming.
|
# ¿ Mar 29, 2008 21:02 |
|
nebby posted:This isn't a revolutionary idea: No, but it's still a bad one. We went over and over this in the last thread. If you have a good point, you're not getting it across very well. The fact that someone told you that your blog post was an eloquent expression of Simonyi's ideas tells me all I need to know about Simonyi's ideas.
|
# ¿ Mar 29, 2008 21:35 |
|
I think I've spent more time reading nebby posts about hungarian than I've spent, total over the 12 years I've been a programmer, being confused by variable names. Nebby, do you have any kind of studies that show this to be any kind of significant problem at all? Honestly, the entire argument reeks of brace-style, tabs-vs-spaces nonsense, except everyone seems to be taking it seriously, which baffles me.
|
# ¿ Mar 30, 2008 22:59 |
|
nebby posted:No, how could I? The whole thing has been largely ignored and discarded by the programming community, who would study it? I dunno. Given the number of grad students in the world, I find it hard to believe that there's been zero studies done. quote:Honestly, it's not a huge issue to me these days, I just am often amazed at the reaction I get when it comes up and the logical fallacies otherwise smart people start throwing out there (a) you are not communicating your ideas well enough, because all these otherwise smart people are just not getting it or (b) you are in fact crazy That's just honest feedback, man. Do with it what you will. quote:I mean, think about it. Many people in this forum think I'm some crazy person, a troll, a kook, a crackpot, throw personal insults and so on because of a variable naming convention I promote when I write computer programs.
|
# ¿ Mar 30, 2008 23:43 |
|
tef posted:If we're going into unicode territory how about something like ∀ x ∈ l : print x; perhaps? We're gonna need bigger keyboards.
|
# ¿ Mar 31, 2008 17:03 |
|
tef posted:This do? look at the hosed-up brace and arrow key placement, I can't use that piece of poo poo. rotor fucked around with this message at 18:30 on Mar 31, 2008 |
# ¿ Mar 31, 2008 18:15 |
|
the talent deficit posted:
jesus christ what the hell
|
# ¿ Apr 2, 2008 03:32 |
|
nebby posted:I mean, clearly this is generated code it's either generated or obfuscated. Either way, it's -really- poorly done. If it's generated, there is no reason to rely on guids for variable names - you gotta track 'em anyway, might as well give 'em decent names - especially where it bloats your code like it does in javascript. If it's obfuscated, why didn't it obfuscate the function names? My money is on a supershitty homemade code generator.
|
# ¿ Apr 2, 2008 17:43 |
|
Victor posted:I reserve r for Regex instances. hey whoa when did we get a 'fixed' tag?
|
# ¿ Apr 2, 2008 20:35 |
|
Triple Tech posted:Code that makes me cry is code without an audit history/trail. I dunno man, I'd start buying kleenex in bulk if I were you.
|
# ¿ Apr 9, 2008 23:13 |
|
the worst thing about endianness for me is that an old coworker insisted on calling it byte sex every opportunity he got, which drove me up the wall.
|
# ¿ Apr 11, 2008 16:18 |
|
_aaron posted:No space before the comma? Clearly this person doesn't know how to properly use white space. they should be using tabs, not spaces. code:
edit: GAH, just turned avatars back on. When did I get that one? rotor fucked around with this message at 23:44 on Apr 12, 2008 |
# ¿ Apr 12, 2008 21:43 |
|
fret logic posted:Before now I was on the fence about going and talking to the department head since previous lectures hinted that my professor actually isn't half bad. Well, not after today. I'm going to have nightmares about this I think: I don't understand how this is supposed to be especially awful for what is, I assume, supposed to be an in-class example or something.
|
# ¿ Apr 14, 2008 19:18 |
|
Zombywuf posted:for loops, have you heard of them? -funrolloops
|
# ¿ Apr 14, 2008 19:25 |
|
Zombywuf posted:/me shudders with horror at the thought that GUI coding should be taught before for loops. I actually agree with narsby. If I was teaching Swing to students, I'd probably keep loops out of the picture as well in a little example like this. I'd be a little if I saw it in production code, but the new JFrame("Chris Busch's CALCULATOR!!!!!!!!"); probably would be a bigger issue. edit: Ah, JingleBells in #cobol caught something: he should be using variables for the label names instead of magic values. Nothing happens when you press the '.' button. doubleedit: oh rotor fucked around with this message at 19:41 on Apr 14, 2008 |
# ¿ Apr 14, 2008 19:34 |
|
a for-while loop, neat. That and a do-switch and I'll be all set.
|
# ¿ Apr 19, 2008 04:38 |
|
Flobbster posted:I'm surprised nobody has mentioned this advantage yet. If I remember my Win32 API correctly, there's a window style called WS_EX_THICKFRAME. But it doesn't let me control the degree of thickness. this thread just took a sharp right heading straight down Hilarious St.
|
# ¿ Apr 25, 2008 18:16 |
|
JoeNotCharles posted:Jesus, what is it with you and your fetish for bitmaps? seriously man. You guys should use vector graphics instead, otherwise you lose a lot of flag resolution at higher word lengths. Fib posted:the difference would be that we'd be allowed to have a "post hot programmer chicks and the most CoCeddest images u got" thread. the man always keeping po programmer folk down edit: rotor fucked around with this message at 22:39 on Apr 25, 2008 |
# ¿ Apr 25, 2008 22:36 |
|
also:
|
# ¿ Apr 25, 2008 23:07 |
|
I am very, very sorry (for posting this scandalous pic of tripletech, lol) rotor fucked around with this message at 05:20 on Apr 26, 2008 |
# ¿ Apr 26, 2008 05:11 |
|
yah i'd booze it up pretty hard if I had to write lisp all day too.
|
# ¿ Apr 27, 2008 00:59 |
|
Scaevolus posted:I bet he means an APL keyboard. No way. I want intersection/union glyphs. I've been typing .contains and .concat for 12 goddamn years like some kind of loving caveman. It's 2008, let's start acting like it people.
|
# ¿ May 29, 2008 22:50 |
|
Programming competitions should be viewed as nerd social events and really not much else, for exactly the reasons outlined here.
|
# ¿ Jun 26, 2008 21:12 |
|
ryanmfw posted:Minus the social part, yeah. I didn't go to them to meet people. It was a lot more fun crushing their hopes and dreams.... Demented and sad, but social.
|
# ¿ Jul 3, 2008 21:37 |
|
n&1 is a little weird, but I don't see what makes it a coding horror!!
|
# ¿ Jan 6, 2009 00:48 |
|
for the record, (n&1) is about twice as fast as (n%2) in javascript modulus: 2237 bittwiddle: 1498 code:
rotor fucked around with this message at 01:35 on Jan 6, 2009 |
# ¿ Jan 6, 2009 01:31 |
|
rjmccall posted:Good lord, it had better be a lot faster than that. n%2 is a floating-point operation in JavaScript. iunno man, run the benchmark urself
|
# ¿ Jan 6, 2009 01:36 |
|
rjmccall posted:Folly of microbenchmarks, I think. Your benchmark time is probably dominated by loop and general interpretation overhead. What did you run it in? build a better one then. Ran it in FF3 and IE6. IE has this thing where it yells at you if the script blocks too long, so those results are suspect.
|
# ¿ Jan 6, 2009 01:42 |
|
rjmccall posted:Right. So let's say operation A takes 1ms to do a million iterations in 1ms, and operation B takes 100ms to do a million iterations, and loop overhead costs you 100ms. So the benchmark takes 101ms for A and 200ms for B; voilà, a 100x difference turns into in a 2x difference. And trust me that that sort of loop overhead is not unreasonable in naive interpreters. it's the exact same loop, but like I said feel free to make a better one. I'm sorry, but simply saying "It must be X, regardless of what the benchmarks may say" is a little too close to faith-based computing for my tastes.
|
# ¿ Jan 6, 2009 01:56 |
|
rjmccall posted:The reason I asked about the browser you were using was just curiosity (also you should always mention the host platform/configuration when reporting benchmark results); Firefox's JS implementation leapt forward in 3.1. I posted the source, run it your drat self on whatever platform you like and check the results, jeez
|
# ¿ Jan 6, 2009 02:03 |
|
rjmccall posted:That's not what I'm saying at all. I'm saying your benchmark is crap and doesn't say anything useful, so we should ignore it. quote:Firefox 3.0.5: 600ms empty, 1150ms modulus, 800ms twiddle, i.e. 550ms modulus, 200ms twiddle. 2x, 3x, meh. Seems like it's in the same ballpark to me. Good to see the other engine results tho. rotor fucked around with this message at 07:24 on Jan 6, 2009 |
# ¿ Jan 6, 2009 02:42 |
|
ih8ualot posted:Why are we doing performance evaluations on an interpreted language? yeah man it's javascript who cares about performance right? the only time programmers should care about performance is when they're programming games and real-time systems.
|
# ¿ Jan 6, 2009 17:27 |
|
ih8ualot posted:I just meant that in terms of determining instruction efficiency, results from a compiled and optimized language might prove to be a better metric. But I could be wrong. did you miss the part where there's no difference between the two in C and a big difference in javascript?
|
# ¿ Jan 6, 2009 23:34 |
|
geetee posted:rotor: I just wanted to say that I missed you while you were gone. I missed u too. protip: never go on vacation with small children, it sucks.
|
# ¿ Jan 7, 2009 02:42 |
|
Victor posted:I was just visiting this insults page I'm really upset that I don't have a section there
|
# ¿ Jan 8, 2009 08:34 |
|
|
# ¿ Apr 28, 2024 22:06 |
|
how!! posted:I call it How!!'s rule of software complexity: As software complexity increases, bugs and features become indistinguishable. i found this thread from the lepers colony. this is probably the funniest thing i've read all day. THINGS ARE HARD. YOU CANT JUST NOT BREAK THINGS. NO ONE KNOWS ANYTHING.
|
# ¿ Jan 17, 2013 08:16 |