Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
JawnV6
Jul 4, 2004

So hot ...

Jethro posted:

:aaaaa:
Sometimes if{} else if {} just isn't elegant enough.

I've seen that a lot in hardware, it makes a lot of sense in that domain. But I really hope that nobody's moving from HDL's to PHP, I can't imagine the horribly broken code that would come from that background.

Adbot
ADBOT LOVES YOU

JawnV6
Jul 4, 2004

So hot ...

such a nice boy posted:

Is that a lesbian porn button under the YouTube button? And why is there a Shakespeare button? Is that to solve the "million monkeys at a million typewriters" problem?
:raise: You're saying you don't have a lesbian porn button on your computer?

Scaevolus posted:

This is sarcasm, right? please?
Variable naming is the last great challenge of coding. Software transactional memory took care of concurrency, now the entirety of software engineering is stuck on retval and i.

JawnV6
Jul 4, 2004

So hot ...

Flobbster posted:

Objective-C has had this so-called "monkeypatching"/extension methods for about 100 years now in the form of categories, and it's about time other languages like C# have decided that it's a feature worth having.

I often hear self-proclaimed "OO purists" complain that attaching methods to a class you didn't write is a violation of OO design

I thought the whole deal with "monkeypatching" was overriding existing methods. So for example, if I want to change String.length() to always return 42 or rand() or something I can do it and make it a horrible mess to debug whenever that library is included.

I work in a language with the constructs "is also" and "is only". So if you've declared a structure and I want to add to it, it's as easy as saying "your_struct is also {...};" If I want to blow it out entirely and replace it, it's "your_struct is only {...};" Same with functions, objects, anything. I can just attach another file and go change everything.

The runtime debugger builds up all the code and figures out the also's/only's, it's one of the only ways to see what the hell is actually included and running.

edit: I forgot "is first". "is also" adds to the end of whatever was there before, "is first" adds to the top.

JawnV6 fucked around with this message at 12:55 on Aug 31, 2008

JawnV6
Jul 4, 2004

So hot ...

Gazpacho posted:

Problem: A procedure is too long.
Solution: Django! :confused:

There are options somewhere in between.

Naw I'm totally sure he'll remember the supply fee discount on small orders in the re-write since's it is adequately documented outside of the code.

JawnV6
Jul 4, 2004

So hot ...

ninjeff posted:

Randomly displaying "poo poo!!!" to the user because of a database error is a pretty big (and hilarious) horror.
Personally, if I had random text floating up from gobs of code I'd be ecstatic to see it was in English.

Cocoa Crispies posted:

nobody wants a web framework that is also an IRC bot framework, especially when the plumbing for IRC imposes non-sensible constraints on the web parts.
Oh drat, really? Because I've got this migration patent...

JawnV6
Jul 4, 2004

So hot ...

Otto Skorzeny posted:

As satisfying as it may be, 1/3 of them will be aligned, so you'll take a huge alignment and luck hit to do this.

Gems should be plentiful, why would luck matter? And if alignment is an issue, polymorphism should be applied liberally.

JawnV6
Jul 4, 2004

So hot ...

1337JiveTurkey posted:

This thread keeps things anonymous for the most part. I think that makes it significantly different from posting something that identifies the author in a public manner. Even if she does improve her coding style the comments will still be there which is unfair to her if potential employers google her in the future.

The response blog seems much more brand-damaging than the square peg haters.

JawnV6
Jul 4, 2004

So hot ...

1337JiveTurkey posted:

She can at least delete that herself.

But it's infused with... pride? It just seems like there's hordes of employers who wouldn't bat an eye at winding up a javascript engine just to bat some text around, while documentation of shattering at anonymous, unfounded internet criticisms might be more problematic.

JawnV6
Jul 4, 2004

So hot ...
I didn't think we had any further depths to sink to after roll-your-own crypto.

JawnV6
Jul 4, 2004

So hot ...
What didn't you know you needed?

JawnV6
Jul 4, 2004

So hot ...

hobbesmaster posted:

Its xchg eax, eax of course!

But uh, seriously don't write xor swap or inline asm for this poo poo. If its even a correct answer its likely not faster than what the compiler has for swap and a rather extreme example of premature optimization.

The best is when you pass xor swap two pointers to the same location which will silently zero it out.

JawnV6
Jul 4, 2004

So hot ...

zergstain posted:

our xmalloc function which calls malloc in an infinite loop until malloc succeeds.

hey I found a horror

JawnV6
Jul 4, 2004

So hot ...

hobbesmaster posted:

What a good idea, why lets just make every library function that can't malloc something just abort() the program! Absolutely nothing could possibly go wrong with this approach!
The sarcasm doesn't hit as hard when they're using xmalloc. You know, specifically meant to do exactly the thing you're mocking.

zergstain posted:

I guess I should ask why this is done this way.
I wouldn't chase that rabbit.

JawnV6
Jul 4, 2004

So hot ...

Novo posted:

I hear this all the time, and yet vim purists act like it's everyone else who can't adapt to unfamiliar things.

My current IDE literally does not have options to move around in the code like vim provides by default. It's not a matter of I can't get used to it, it's that the IDE offers no support for the thing I wanted to do and I have to go without.

As a trivial example, in vim * will search for the current word in the same file. Shift-F12 does something similar and comes up with every instance of that variable across the project, a half step up even. But vim also has %, which finds the matching brace for the one under the cursor, and VS simply doesn't have an equivalent.

JawnV6
Jul 4, 2004

So hot ...
Ugh, second time I've been corrected like this. Thanks! There's more esoteric vim hooks that I'd like, but it's not worth drilling down on that.

Shinku ABOOKEN posted:

Also: Windows style navigation and selection (Arrow keys+Modifiers+Home+End+PgUp+PgDn) > Your bespoke navigation system every single time (same for Emacs and whatever else is there).
Easy navigation from the home row common to countless other unix utilities is now "bespoke"? I learned it from nethack of all things. Nevermind that arrow keys etc. work just fine in gvim.

Shinku ABOOKEN posted:

It's OK to love vim just don't claim it's superior.
Yeah, declaring that something's better or worse from a position of abject ignorance would just be daft.

And that same paragraph had a better version of what I used * for :)

JawnV6
Jul 4, 2004

So hot ...

Ithaqua posted:

But VS automatically highlights the matching brace, so there's no need. :confused:

Which is entirely unhelpful when that matching brace is offscreen, or I want to use a regex to replace text in this function alone, or...

e: it also only highlights when the cursor is 'outside' the brace

JawnV6
Jul 4, 2004

So hot ...
ASSERT()

JawnV6
Jul 4, 2004

So hot ...
And today I learned that c++ lets you overload the array operator.

JawnV6
Jul 4, 2004

So hot ...
Look the obvious solution is to chuck out these untrusted mechanized "compilers" and go back to humans reading HLL's and writing equivalent assembly.

JawnV6
Jul 4, 2004

So hot ...

Zaphod42 posted:

Wow. Every part of that is solid loving gold. :allears: I really love their hack solution too, and when it gets to garbling the data to avoid null terminators in the EULA string, that's just the best coding horror I've ever read.

Slammer had to do the same thing. Didn't fix it up after, but it's pretty common to craft a payload to avoid a null byte.

JawnV6
Jul 4, 2004

So hot ...
Your IDE doesn't manage whitespace for you? What a primitive environment.

JawnV6
Jul 4, 2004

So hot ...
fascinating

JawnV6
Jul 4, 2004

So hot ...
i'm tracking milliliters in my camelCase code, should it be targetML, targetmL, targetMl, or targetml???

JawnV6
Jul 4, 2004

So hot ...
nah just Class educated

JawnV6
Jul 4, 2004

So hot ...
So don't do that.

JawnV6
Jul 4, 2004

So hot ...
Huh, I could use a library, glue poo poo together, and be done today. Oooooor I could rewrite all the functionality myself and be entertained all week!!

JawnV6
Jul 4, 2004

So hot ...
How accessible were those tools in 1990? That's when the super NES came out, and most of those games were still hand-rolled asm.

JawnV6
Jul 4, 2004

So hot ...
You can go too far off that end as well, you know the type of programmer who went from perl to php to ruby to rails to django to flask to python to never learning how to do one thing well, just how to tweak the language/framework du jour.

I can see how a constrained environment that had already been burned on tooling once would eschew it. All it takes is another debug that root-causes to an error in the mnemonics that takes a day or two to sour on the whole proposition.

JawnV6
Jul 4, 2004

So hot ...

Plorkyeran posted:

When trying to find out why a blob of code is doing some non-obvious thing, how often do you find the source control history to be of use?

teach you not want don't provide

JawnV6
Jul 4, 2004

So hot ...

Pilsner posted:

Again, I don't see a problem with doing checkins the strict way, I just don't think it's worth the effort for me, nor do any of my colleagues ever miss it. I'm all for reacting to smells and annoyances, but there just aren't really any in our company with regards to source control, in spite of the old fashioned way we do things.

It's really weird to see this all phrased in terms of "effort" because jfc you typed out 20 commit's worth of messages defending doing it the lovely way, which you weren't presumably paid to do. Nobody's sitting there at the machine limit of efficiency. We're all somewhere at the 5-10% mark in terms of how much code could actually be wrung out of us. Typing two sentences about your state of mind once a feature is zero effort amortized across a project.

If you're just using version control to make safe checkpoints once a day, no poo poo you never look back at them. You don't have a reason to since they're worthless apart from giant fuckoff failures. You're also not, as Desert Rose pointed out, doing small one-off experimental builds with the confidence that you can back it all out quickly.

JawnV6
Jul 4, 2004

So hot ...
law.l

JawnV6
Jul 4, 2004

So hot ...
Uh, considering they're both Korean?

JawnV6
Jul 4, 2004

So hot ...

No Safe Word posted:

Clearly they aren't willing their companies to success, PASS

If someone's on year 9 of every company failing within a year we're not dinging them for lack of supernatural ability. It's their selection process.

JawnV6
Jul 4, 2004

So hot ...
Yeah, cramming a bunch of boilerplate in your face is still totally necessary in 2013. Those simple languages? The ones built for learning? Pfah, they lack xml RPC mechanisms and will leave you high and dry.

JawnV6
Jul 4, 2004

So hot ...

ManoliIsFat posted:

That's true. That Assert failing may be indicative of larger problems, like up being down, day being night, 2nd coming of Jesus kinda stuff.

Well in 10 days we'll be cursing the bank software authors that pushed these halfassed assumptions into production.

JawnV6
Jul 4, 2004

So hot ...
Yeah the C preprocessor is trivial to extend.

JawnV6
Jul 4, 2004

So hot ...
Enclassulate

JawnV6
Jul 4, 2004

So hot ...
https://github.com/YaroslavGaponov/node-jvm

Yes. We needed this.

JawnV6
Jul 4, 2004

So hot ...
Thank god for the little bumps in the lines. Can't imagine how you'd trace them if they just went point to point.

Adbot
ADBOT LOVES YOU

JawnV6
Jul 4, 2004

So hot ...
I'm pretty sure working with PA would have downsides not included in "bad pay/terrible hours"

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply