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
fletcher
Jun 27, 2003

ken park is my favorite movie

Cybernetic Crumb
I'm trying to fix a bug in some poorly written Actionscript 2.0 app. I wish I could post the entire source, this thing is a loving disaster. I already went through the supporting javascript, it's down to 30 very clear lines instead of 250 lines of garbled bullshit. The actionscript is thousands of lines though, gently caress.

edit: here we go. Why pass it as an argument to the function when you can build it into the function name??

code:
private function saveInput(objField):Void{
	var userinput = objField.userinput;
	_root.debug("INPUT","=========== saveInput("+userinput+") ==========");
	Constants.data_main[0] = userinput;
	Constants.obj_timelines[0].redraw();
}

private function saveInput5(objField):Void{
	var userinput = objField.userinput;
	_root.debug("INPUT","=========== saveInput5("+userinput+") ==========");
	Constants.data_main[0] = userinput;
	Constants.data_main[1] = userinput;
	Constants.data_main[2] = userinput;
	Constants.data_main[3] = userinput;
	Constants.data_main[4] = userinput;
	Constants.obj_timelines[0].redraw();
	Constants.obj_timelines[1].redraw();
	Constants.obj_timelines[2].redraw();
	Constants.obj_timelines[3].redraw();
	Constants.obj_timelines[4].redraw();
}

fletcher fucked around with this message at 02:25 on Mar 14, 2009

Adbot
ADBOT LOVES YOU

fletcher
Jun 27, 2003

ken park is my favorite movie

Cybernetic Crumb

TheSleeper posted:

Oh cool, thanks for the heads up.

:( I just wanted to vent

fletcher
Jun 27, 2003

ken park is my favorite movie

Cybernetic Crumb
The gently caress is with people using the eclipse auto format bullshit on code they don't even need to change, and then they check it in anyways to make my next diff/merge a living hell?

fletcher
Jun 27, 2003

ken park is my favorite movie

Cybernetic Crumb

plushpuffin posted:

Use a diff utility that can ignore whitespace changes.

It's not just whitespace. static functions get moved to the top, variable/function names get sorted alphabetically, and the curly braces go from 1TBS to K&R

fletcher
Jun 27, 2003

ken park is my favorite movie

Cybernetic Crumb

1337JiveTurkey posted:

That's an Eclipse quirk. IntelliJ is perfectly happy to list the class structure in the sidebar in alphabetical order while leaving the code well enough alone. In any case if it's impossible to find anything in a class without putting every member in alphabetical order, the class is probably too drat big to begin with.

Eclipse lists it in alphabetical order in the sidebar while leaving the code alone as well, but if you do Source->Format or Source->Cleanup or whatever the hell it is it will rearrange everything.

I can't imagine why they even put something like that in. Are people really that lazy that they can't keep their code formatted properly as they write it?

fletcher
Jun 27, 2003

ken park is my favorite movie

Cybernetic Crumb

Zakalwe posted:

I spend most of my "coding time" thinking through algorithms or optimizing code. Typing is the tedious part. I've set up my indenter to format my code in the style I like. I use autocomplete. It's a tool. Do you use an IDE?

Yeah, I use autocomplete all the time, I couldn't live without it. I have my indenter setup the way I like as well, and it will add curly braces for me at convenient times. None of that has to do with what I was talking about. I use eclipse.

fletcher
Jun 27, 2003

ken park is my favorite movie

Cybernetic Crumb

Inverse Icarus posted:

I swear to God, I am so disillusioned with academia after having to interview a fair number of people. I knew this sort of thing happened when I went to school, but I had no idea at some of the garbage that still somehow floats to the top.

This kind of thing has really bothered me throughout my academic career. People are so focused with trying to make a certain grade that they forget they are actually supposed to learn something. Over and over in my classes I see people end the semester with an A and in reality they haven't learned a drat thing.

fletcher
Jun 27, 2003

ken park is my favorite movie

Cybernetic Crumb

Mikey-San posted:

Fun way to stop people from checking in code that breaks the build: set up your VCS to notify a build machine every time someone checks in changes. Have your thankless robot build the project on every commit. When the build fails, your robot fires off an email to everyone:

THE loving PROJECT DOESN'T BUILD NOW
YOU CAN THANK: <PERSON>
BECAUSE OF HIS OR HER CHECK-IN: <REVISION NUMBER>
GO YELL AT THIS PERSON



quote:

These 3 bears sit in a prominent position and watch our developer’s every move. When things are good we have a green bear gently glowing and purring, when changes are being processed a yellow bear joins the party, and if the build gets broken the growling evil red bear makes an appearance. The developer who broke things usually goes a similar shade of red while frantically trying to fix whatever was broken while the others chortle in the background.

http://blog.last.fm/2008/08/01/quality-control

fletcher
Jun 27, 2003

ken park is my favorite movie

Cybernetic Crumb

UserNotFound posted:

I have an SQL statement that is AT LEAST twice as long as the 5000 character limit per post, and there's an error in it somewhere:

....
...
and it just keeps going...but i've narrowed the problem down to something in that general area....

This doesn't look good:
code:
"RNAME" = 'China'SELECT 
edit: there are a few occurrences of this, did something get screwed up when you posted it?

fletcher
Jun 27, 2003

ken park is my favorite movie

Cybernetic Crumb
How about writing JSON by hand in Java instead of using a library? Why would anybody do this to themselves :(

fletcher
Jun 27, 2003

ken park is my favorite movie

Cybernetic Crumb
My friend was taking an online quiz and I noticed how lovely the website looked, so I did a View->Source to have a laugh. All of the answers to the questions were in there as <input type="hidden"/>. Not only that, but the last 10 questions had incorrect answers marked in the key. After you finish the quiz it doesn't tell you your score or which ones you got wrong, it's just a pass/fail, so who knows how long this has gone by without notice.

fletcher
Jun 27, 2003

ken park is my favorite movie

Cybernetic Crumb

Hammerite posted:

What kind of online quiz? One of those "WHICH FAMILY GUY CHARACTER ARE U???" type ones, or something important?

Slightly more important than that type of quiz, but not terribly important. It was a quiz that the company gives its employees to see if they are knowledgeable enough to sell a certain product. I notified them about the stupidity anyways.

fletcher
Jun 27, 2003

ken park is my favorite movie

Cybernetic Crumb

1337JiveTurkey posted:

No, .NET is Stalin and Mono is the People's Republic of Tannu Tuva. PHP is probably Imperial Japan or something.

PHP just doesn't have an Imperial Japan feel to me. PHP is more like a tribe that is into some weird freaky poo poo they do out in the middle of the jungle, oblivious to the modern civilizations being built around them.

fletcher
Jun 27, 2003

ken park is my favorite movie

Cybernetic Crumb

QuarkJets posted:

Speaking of backups, I've been using Microsoft SyncToy on my home machine to back up files from one disk to another. It's actually extremely easy to use and well-designed. So the opposite of a coding horror, I guess

Is that really a backup though if the disks are in the same physical location?

fletcher
Jun 27, 2003

ken park is my favorite movie

Cybernetic Crumb

Powerful Two-Hander posted:

Also my phone autocorrected github to virgin.

loving :lol:

fletcher
Jun 27, 2003

ken park is my favorite movie

Cybernetic Crumb

Manslaughter posted:

I always thought of typecasting as "I'm going to use my +2 programmer's staff to cast this IWankable into a WankPole"

Pretty sure that would throw a ClassCastErection

fletcher
Jun 27, 2003

ken park is my favorite movie

Cybernetic Crumb

return0 posted:

I am going to attempt to engineer a context where typecasting is discussed at work so I can say this!

Go write it on a whiteboard right before somebody uses that room for an interview

fletcher
Jun 27, 2003

ken park is my favorite movie

Cybernetic Crumb
The 1600 line bash script is too complex, so lets put a 1000 line wrapper written in perl in front of it :downsbravo:

fletcher
Jun 27, 2003

ken park is my favorite movie

Cybernetic Crumb

necrotic posted:

I had forgotten how utterly horrible PHP is.

I don't understand where those 3 examples you quoted would come into play in the real world at all

Adbot
ADBOT LOVES YOU

fletcher
Jun 27, 2003

ken park is my favorite movie

Cybernetic Crumb

Subjunctive posted:

I first got my name in the Linux commit log (CREDITS at that point, I believe) by writing a pile of comments. Maybe that would be a better route for him.

But this guy is only a Google search away for a perspective employer to see that he is a complete rear end

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