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
Gazpacho
Jun 18, 2004

by Fluffdaddy
Slippery Tilde

hobbesmaster posted:

Its 2012, you can afford a couple hundred bytes of memory.
You quite missed the point (and the sarcasm). They're string buffers. For input and stuff.

Gazpacho fucked around with this message at 03:48 on Sep 6, 2012

Adbot
ADBOT LOVES YOU

Gazpacho
Jun 18, 2004

by Fluffdaddy
Slippery Tilde

MeruFM posted:

that's amazing and reminds me of something similar

in python
code:
lastNum = 5
...
...
lastNum = "lastNum"
...
...
lastNum = lastNum + "= 5"
...
...
in production code.

My brain exploded.
What could this possibly have been trying to accomplish?

Gazpacho
Jun 18, 2004

by Fluffdaddy
Slippery Tilde
If you assume that a notation in a programming language should behave consistently with a similar notation in some other programming language or any other formal notation at all, you are making a rookie mistake.

Gazpacho
Jun 18, 2004

by Fluffdaddy
Slippery Tilde
OK, medical IT will rob you of your sanity. But at least you get paid mad cash right? Right?

Gazpacho
Jun 18, 2004

by Fluffdaddy
Slippery Tilde
shrughes? More like Scrooghes. :buddy:

Gazpacho
Jun 18, 2004

by Fluffdaddy
Slippery Tilde

xf86enodev posted:

This is the most depressing thing I've ever read about computing. Even looking for the 'any' key sounds more reasonable.
Sounds like someone's never had a chance to explore the interesting "theories" about memory that people can carry over from languages with automatic memory management.

Not that I'm perfect, mind you. I had to struggle for years with the concept that machine language really doesn't work like BASIC and is something totally different. Fortunately nobody was paying for my code during that time.

Gazpacho
Jun 18, 2004

by Fluffdaddy
Slippery Tilde

zergstain posted:

Place I'm starting at in about a week uses CVS. I'm not sure how I should feel about that.
CVS is flat-out obsolete. As I've said over in the --> VCS thread, <-- using obsolete VCS technology is tolerable as long as the team supplements it with tools and practices that address its shortcomings. In the case of CVS the weaknesses include file skew, and the practices include automating the heck out of the build/validate/tag process so that it happens the same, right way every time.

Wheany posted:

There is always the option of not using any version control at all. (There might be directories <product>_old <product>_old_old <product>_bak etc on the server, for example)
It's you, you're the horror in this derail. Unless you're offering that as an example where zerg should be legit worried, in which case yeah.

Gazpacho fucked around with this message at 00:31 on Dec 28, 2012

Gazpacho
Jun 18, 2004

by Fluffdaddy
Slippery Tilde
Some people just take comfort in developing the hard way that they know rather than the easy way they could learn. I also have had to repeatedly hassle a developer to move tags out of his code sections.

Gazpacho
Jun 18, 2004

by Fluffdaddy
Slippery Tilde
That particular layout task involves common off-by-one gotchas that a novice is going to struggle with regardless of whether they use a template system. At best the use of a template system will make any bugs stand out better on review.

Gazpacho
Jun 18, 2004

by Fluffdaddy
Slippery Tilde
A server side integer variable isn't my idea of an exorbitant cost and you are getting sort of hung up on the specifics of an arbitrary example.

Gazpacho
Jun 18, 2004

by Fluffdaddy
Slippery Tilde

Freakus posted:

Html in code is bad, but code in templates is bad. There's more code than html in all rewrites I've seen - really, what's the point either way?
My point in this case is that, god willing, someone reviewing the template version with appropriate syntax highlighting will notice that it does not have TDs inside of TRs inside of TABLEs, realize that it's buggy, and correct the SOB; whereas with a string-building approach the tag structure won't be highlighted or otherwise separated from the generated content.

Gazpacho
Jun 18, 2004

by Fluffdaddy
Slippery Tilde

dwazegek posted:

Found about a bazillion instances of this in a ASP.NET MVC3 project
Oh, I can just guess:

[Junior dev drops XHTML tag into HTML document]
"Why the gently caress am I getting a warning? Stupid Macro$uck!! They can't do anything right!"
[Dev changes tag to a string echo, saves day]:c00lbutt:

Gazpacho
Jun 18, 2004

by Fluffdaddy
Slippery Tilde
Lucky you — The dev before you commented his "e-mail the error to an alias" code.

Gazpacho
Jun 18, 2004

by Fluffdaddy
Slippery Tilde
Well if you decide to fix it be really careful and go slow and test everything. In my previous job I rewrote some copy-pasted code to about a tenth of the code size and felt really good about it until a customer site in Japan said they were broken. (I had left one of their copies out of the new version.)

Gazpacho fucked around with this message at 21:18 on Jan 11, 2013

Gazpacho
Jun 18, 2004

by Fluffdaddy
Slippery Tilde
I know that and it doesn't change what I said.

Gazpacho
Jun 18, 2004

by Fluffdaddy
Slippery Tilde
Problem: A procedure is too long.
Solution: Django! :confused:

There are options somewhere in between.

Gazpacho fucked around with this message at 20:31 on Jan 16, 2013

Gazpacho
Jun 18, 2004

by Fluffdaddy
Slippery Tilde

HORATIO HORNBLOWER posted:

Can't decide if I'm proud of ashamed.
Incest is bad, mmkay?

Gazpacho
Jun 18, 2004

by Fluffdaddy
Slippery Tilde
It's totally predictable once you know the semantic rules; object fields are not in scope, except those of the global object. It's not like you're dealing with implementation bugs or DWIM madness.

Gazpacho fucked around with this message at 14:53 on Jan 20, 2013

Gazpacho
Jun 18, 2004

by Fluffdaddy
Slippery Tilde

Contra Duck posted:

code:
boolean aTrueValue = true;
boolean aFalseValue = false;
My guess is that someone overheard that this is recommended for Boolean to improve performance, and has gone cargo-cult with it using booleans instead.

Gazpacho
Jun 18, 2004

by Fluffdaddy
Slippery Tilde
Crossposted from YOSPOS: The ancient bug that woke up me and other devs in the middle of the night for weeks because none of us knew what valgrind was.

C++ code:
shared_ptr<FILE> fp = fdopen(sock, "r");
The real horror is that the code wasn't doing anything that it couldn't do with file descriptors anyway.

Gazpacho fucked around with this message at 03:29 on Jan 23, 2013

Gazpacho
Jun 18, 2004

by Fluffdaddy
Slippery Tilde

armorer posted:

So the senior dev blamed his lovely code on the users being stupid? That is one of the most ridiculous sidesteps I've ever heard.
In that context he's probably right.

Gazpacho
Jun 18, 2004

by Fluffdaddy
Slippery Tilde
All of Perl's alternative conditionals are horrors and people who use them are bad.

Gazpacho
Jun 18, 2004

by Fluffdaddy
Slippery Tilde
Are you saying that you have to code with a line editor in 2013 CE? You're not saying that, are you?

Gazpacho
Jun 18, 2004

by Fluffdaddy
Slippery Tilde

The Gripper posted:

Australia's developer market is super trashy to enter into currently so I won't fault you for sticking with the job you have for the time being, but for the love of god make sure you mention this home-rolled BASIC setup as an issue in your next interview, don't gloss it over.
Say it in interviews with technical staff though, not to recruiting bots because they won't know what it means except that you have no skills now and forever.

Gazpacho
Jun 18, 2004

by Fluffdaddy
Slippery Tilde
I once patched an output encoding bug that I had no way to reproduce, by copying and pasting the offending library routines into the app, 3 calls deep, then modifying the innermost function to discard the problem characters.

And I'd do it again. That ticket was OLD.

Gazpacho fucked around with this message at 07:25 on Mar 25, 2013

Gazpacho
Jun 18, 2004

by Fluffdaddy
Slippery Tilde
The command means exactly what the word says, but people used to Subversion/Perforce tend to forget that those systems "implement" content branching by not really implementing it all but making you simulate it yourself with the directory tree.

This is why so many people, when they want to branch content in git, approach it as "I gots to make a new directory somewheres and copy stuffs to it."

Gazpacho fucked around with this message at 08:40 on Apr 17, 2013

Gazpacho
Jun 18, 2004

by Fluffdaddy
Slippery Tilde

Gazpacho fucked around with this message at 19:49 on Apr 17, 2013

Gazpacho
Jun 18, 2004

by Fluffdaddy
Slippery Tilde
I apologize. My previous comment was too much like "Linux community support" sperging and not the right approach.

Gazpacho
Jun 18, 2004

by Fluffdaddy
Slippery Tilde
Welcome to the Unix command line.

Gazpacho
Jun 18, 2004

by Fluffdaddy
Slippery Tilde

Presto posted:

The other problem is that it's insidious. Every time I think I finally have a handle on it, it does something that I can't fathom. "OK, I'll just do a pull here and... wait, how can I have a merge conflict in a file that I haven't loving touched?"
This can happen if you have your editor set up to mess with files when opening them (or when saving them without any changes), or you're in the habit of committing files without doing a once-over review of what you're committing, or if you did the once over and committed irrelevant changes while giving no fucks.

Whatever the case may be, git provides you the necessary diff tracking to find out what happened and learn from it so you should do that. And god help you if you believe hacking a CVS repo is a reasonable recovery option.

Gazpacho fucked around with this message at 21:32 on Apr 19, 2013

Gazpacho
Jun 18, 2004

by Fluffdaddy
Slippery Tilde
I wish I could find the project I came across years ago, where someone had built a lazy computation system in C++ out of logical operators.

Gazpacho
Jun 18, 2004

by Fluffdaddy
Slippery Tilde

Dren posted:

I've found that you don't have to ask people about code in order to figure out that they can't code. You can weed them out before that. Ask them to explain some projects on their resume, their role on those projects, and describe a code problem they encountered.
What are you looking for with that last bit? Because people who have a poor grasp of programming language semantics can tell you about encountering code problems all day.

Gazpacho
Jun 18, 2004

by Fluffdaddy
Slippery Tilde

Volmarias posted:

As opposed to...
Line editors of course.

Gazpacho
Jun 18, 2004

by Fluffdaddy
Slippery Tilde

Dirk Pitt posted:

The first thing you learn when you leave the sacred grounds of the computer engineering area of your local university, is throw everything they taught you about programming out the window.
If it's the first thing then why do I keep running into CEs and EEs who haven't learned?

Gazpacho
Jun 18, 2004

by Fluffdaddy
Slippery Tilde

Deus Rex posted:

No, people with my background are superior to all others because they're like me.
As an EE grad with years of hindsight about myself and other grads, I will admit that EEs tend to latch onto some seriously bogus and antiquated ideas about programming.

Gazpacho
Jun 18, 2004

by Fluffdaddy
Slippery Tilde
I'm guessing it's just a series of customizations that clients asked for over an extended period and were hacked in the most immediately convenient way possible.

Gazpacho
Jun 18, 2004

by Fluffdaddy
Slippery Tilde

Bunny Cuddlin posted:

I'm tempted to post this whole code segment, but I think it's better to meditate on what someone was thinking when they wrote this line:
C# code:
if (LongErrorMessage != "System.Object")
The dev responsible has a background in writing Unix admin scripts?

Gazpacho
Jun 18, 2004

by Fluffdaddy
Slippery Tilde
You need a smaller review meeting.

Gazpacho
Jun 18, 2004

by Fluffdaddy
Slippery Tilde
I imagine you all on the day of layoffs, sobbing and crying out "How could we fail? WE HAD A CODING STANDARD!"

Adbot
ADBOT LOVES YOU

Gazpacho
Jun 18, 2004

by Fluffdaddy
Slippery Tilde
C# code:
catch(SomeException ex)
{
    Assert.IsTrue(ex is SomeException);
}

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