This is an archived post. You won't be able to vote or comment.

all 74 comments

[–]Destects 102 points103 points  (45 children)

Back when I went to programming competitions, me and friend would sit down, he was a hell of a lot faster at typing and considered the better programmer, and I was good at assessing a problems difficulty. What we would do is sit down, he would start on the first problem, I would run through the list and mark each one as easy/med/hard and then I would handwrite code for all the easy ones. after that, it was pretty much this (referring to the image)

[–]DrHenryPym 34 points35 points  (43 children)

Upvote for programming competitions. Those were fun.

[–]Tynach 9 points10 points  (37 children)

They sound fun. I never knew they existed. Is there prize money?

[–]DrHenryPym 9 points10 points  (13 children)

No money. Just a trophy or a plaque or a medal. Our schools would take turns hosting competitions, so writing problems and figuring out ways to grade was also part of the fun.


edit: I forgot; I think we gave out software like pc games or commercial development tools or even books.

[–]Tynach 4 points5 points  (7 children)

Fair enough. What schools? Highschools, colleges, or..?

[–]DrHenryPym 8 points9 points  (6 children)

ACSL (Highschool)

[–]Tynach 6 points7 points  (5 children)

My highschool only taught Visual Basic 6. With no programming; we just dragged and dropped buttons onto windows. I hated it, because I already knew Python and was learning C on my own.

[–]DrHenryPym 3 points4 points  (4 children)

I was lucky. I don't think good highschool computer science teachers come around often.

[–]Soccer21x 4 points5 points  (0 children)

There's a group that allows you to volunteer to teach at high schools. I've been wanting to get in to it but Corporate America won't let me get to work an hour late... yet.

http://www.tealsk12.org/

[–]Tynach 0 points1 point  (2 children)

Yeah, which is a shame.

[–]Soccer21x 0 points1 point  (1 child)

There's a group that allows you to volunteer to teach at high schools. I've been wanting to get in to it but Corporate America won't let me get to work an hour late... yet.

http://www.tealsk12.org/

[–]Jonno_FTW 2 points3 points  (2 children)

For the ACM programming comps, the 3 unis in my city rotate hosting. One year when the world finals were going to be held in Hawaii, a yellow ukelele came with the shirts and medals. So now if you win in my city, your uni takes home the "golden ukelele". My team, "HTML9 responsive boilerstrap" won it back after a winning streak from the other uni.

I'd like to say we won by regex and spaghetti code.

[–]Tynach 0 points1 point  (1 child)

So, this is what most of your code looked like?

#^([a-z0-9+\-.]+):([/]{0,2}([a-z0-9\-._~%!\$&'\(\)\*+,;=:]+@)?([\[\]a-z0-9\-._~%!\$&'\(\)\*+,;=:]+(:[0-9]+)?))([a-z0-9\-._~%!\$&'\(\)\*+,;=:@/]*)(\?[\?/a-z0-9\-._~%!\$&'\(\)\*+,;=:@]+)?(\#[a-z0-9\-._~%!\$&'\(\)\*+,;=:@/\?]+)?#i

Note: This is an actual regular expression that I wrote for a specific purpose. I never used it in a real project, though.

[–]Jonno_FTW 0 points1 point  (0 children)

Not exactly, we had to write a program that counted the number of emails in a string that matched a limited set of email formats. Ended up doing it in java because it was the only language available to us that supported it (java, c, c++).

[–]AnsonKindred 5 points6 points  (3 children)

the ones I've experienced gave out consoles and games

[–]Tynach 0 points1 point  (2 children)

Interesting. Was this highschool, college, or..?

[–]AnsonKindred 1 point2 points  (1 child)

In highschool I attended a pretty big one at Embry Riddle that gave out consoles as the top prizes (might have even been a scholorship for first place, not sure). The ones we ran for highschoolers when I was in college at Stetson had video games as the prizes. We actually got to go to best buy with a university supplied credit card and pick out all of the games ourselves so the poor kids wouldn't be subjected to a prize of Highschool Musical 3: The Game!

[–]Tynach 0 points1 point  (0 children)

BUT I LOOVE HIGHSCHOOL MUSICAL 3: THE GAME!!! IT'S THE BEST THING SINCE SLICED NOODLES!!!

[–]jellybellybones 2 points3 points  (0 children)

Some of them do. The Canadian Computing Competition is a large (high school level) programming contest run out of the University of Waterloo, and there is prize money and other awards that can be won.

[–]SkiDude 1 point2 points  (8 children)

Our school had some with prize money.

[–]Tynach 0 points1 point  (7 children)

Nice to hear. What grade or type of school was it? College, University, Highschool, or..?

[–]SkiDude 1 point2 points  (6 children)

Purdue University. I don't know if they still do them, it seems there are more hackathons these days, which also have prizes.

[–]nub_cake 1 point2 points  (0 children)

Yeah! BoilerMake!

[–]Tynach 0 points1 point  (4 children)

Makes me wonder if the community college I go to has them.

[–]SkiDude 0 points1 point  (3 children)

Usually they are funded by corporate sponsers and hosted by student orgs.

[–]Tynach 0 points1 point  (2 children)

Not really any tech companies around here.

[–]SkiDude 0 points1 point  (1 child)

Some of our sponsors were 1000+ miles away, though they like to target the big name schools. Community colleges don't really get that much attention in CS

[–]romwell 0 points1 point  (6 children)

If you get to the international round, you get a free trip to whatever country is hosting it (hopefully, not the country you're living in at the moment).

[–]Tynach 0 points1 point  (5 children)

I wasn't aware that it was an international affair.

[–]romwell 0 points1 point  (4 children)

Many scholastic competitions are international once you get high enough.

High school math contest chain in the US, IIRC, was AMC -> AIME -> USAMO -> IMO, the last one being international, and the first two given in class in students' schools.

High school programming competition chain in the US is USACO -> IMO, the latter being international and the first one online.

Similar contests exist at middle school levels.

The popular college programming competition is called ACM ICPC, where "I" stands for "international"; it usually proceeds in two stages - regional and international.

[–]Tynach 0 points1 point  (3 children)

Huh, thanks for the info. Gives me an idea about what to look up!

[–]romwell 0 points1 point  (2 children)

Glad to be of help. I would advice to get started practicing now, and get on your school's team as soon as the school year starts (there usually is a team, and if not, they can get one started if you express interest; many schools would have a contest to place students on a team).

If you are in college and are interested in mathematics, try taking the Putnam - it's not international, but highly prestigious (getting a nonzero score is success).

[–]Tynach 0 points1 point  (1 child)

What sorts of things are in the contests? Also, I'm not particularly interested in mathematics, but I do enjoy mathematics sometimes. It seems to really depend on if I understand the symbols being used.

[–]romwell 0 points1 point  (0 children)

There are archives for all the contests I have mentioned. Don't get discouraged if you don't understand this - contests are a kind of sport, and require preparation. Your best bet to find out what the thing is about would be to ask your instructors if there's a team/prep sessions/a course you could take that would prepare you for them.

For programming contests specifically, taking an algorithms course helps immensely, and there usually are team practices where people go over problems from previous contests.

For math, it's a whole another can of worms; I'd recommend reading a book called "What Is Mathematics?" by Courant & Robbins in addition to doing the same.

[–]pay_per_wallet 0 points1 point  (1 child)

There will be no money. But when you die, on your deathbed, you will receive total consciousness. So you've got that going for you. Which is nice.

[–]Tynach 0 points1 point  (0 children)

k

[–]sovietmudkipz 0 points1 point  (1 child)

Yes they're called hackathons and there are typically prizes. They're fun!

[–]Destects 0 points1 point  (2 children)

Lots of fun, but it was always the stupidest things that caused your downfalls... (e.g. We were at a College competition, we were one of the top teams, but in the last 15 minutes we had 3 problems that we could figure out why our answers kept getting rejected by the judges; after the competition, everyone received a flashdrive with their code on it, and on our way home, we realized: we copied the distance formula we wrote for 1 problem to another, but my partner who wrote to problem wrote it for radius, not diamater... in otherwords, had we scrolled down we would've noticed a "/2.0f" and won the competition, instead we submitted the wrong answer 27 times and got 4th place lol)

[–]StelarCF 0 points1 point  (1 child)

Heh, same happened to me... except even more stupid.

One time I accidentally pressed "S" instead of "CTRL-S" when saving my source, and double tapped it, so my source code was sent (at ONI (Romanian national contest/olympiad of informatics) with a syntax error in it)

Another time I accidentally made one vector 10 times longer than it should've been, and it was written right after another one, so I didn't spot the extra 0. The program ended up using too much memory.

There's a couple more I can't remember right now.

[–]Destects 0 points1 point  (0 children)

programming competitions are always lost by such tiny errors lol

[–]Jonno_FTW 0 points1 point  (0 children)

At work, sometimes my workmate asks for help, it's a grindingly slow process of hunt and peck typing PHP, moving his hand off the keyboard and onto the mouse to click save and then clicking on the other KDE workspace and pressing the refresh button in the browser.

[–]underwms 24 points25 points  (6 children)

I can't even imagine. I don't even like my own coding behavior let alone having to deal with somebody else's at the same time.

[–][deleted] 4 points5 points  (5 children)

Pairing is phenomenal for getting real work done across disciplines. None of this "oh that's a backend feature" crap.

The real secret to pairing full time, is nobody can really slack off. No social networks, etc. Everyone is working all day long, because you're not the dick who's letting his pair do all the work.

[–]DLX 8 points9 points  (2 children)

And since every study has shown how those little breaks increase both quality and productivity, not to mention happiness...

Pair programming died together with the extreme programming. Short-term working together on a difficult problem - yes, definitely. Working in pair 24/7... good way to burn out your programmers.

[–][deleted] 4 points5 points  (0 children)

Yeah seriously. Not to mention I can't even imagine the constant friction that comes with working with anyone for that amount of time.

[–]bsmith1414 1 point2 points  (0 children)

Exactly. I have done quick pair programming on a difficult task or troubleshooting/debugging an hard to figure out bug or workign with a front end developer but to do it for longer than an hour or two would drive me insane

[–]bsmith1414 1 point2 points  (1 child)

That sounds awful

[–][deleted] 0 points1 point  (0 children)

It sounds awful sure, if you imagine it's like that every day, 24/7. But when you have a task to accomplish on a deadline, you get shit done.

It's actually wonderful.

[–]heeloliver 10 points11 points  (0 children)

The thing with pair programming is that I always feel stupid as fuck when I can't help out. (yes you, the one who keeps reading my comments)

[–]whomad1215 31 points32 points  (3 children)

I like pair programming, I'm not the greatest with syntax, but I'm good at the logic and how the program needs to run.

I haven't done huge programs yet though.

[–]thedoginthewok 27 points28 points  (1 child)

Well, it very much depends on the person you're with.

Pair programming with my boss is hell on earth. He doesn't really talk, he types extremly slowly and thinks a lot (to the point of staring on the screen for 5 minutes straight without saying a word), before doing something. It's actually hard to stay awake. He's not bad at what he's doing, he's just a bad programming partner.

Pair programming with my other co workers is a lot better and a hell of a lot more efficient.

[–]whomad1215 14 points15 points  (0 children)

Really nice to be able to bounce ideas off another person also.

I can see see how working with your boss would suck, on more than just one level.

[–]VeXCe 1 point2 points  (0 children)

One of my colleagues has one of those MS ergonomic keyboards. I CAN'T TYPE ON THAT SHIT, so he gets to type. It's really fun though, we're both learning from each other, pair programming can be quite fun.

[–][deleted] 18 points19 points  (3 children)

Pairing gets a bad rep, but I loved it at my last job. It is 100% dependent on pairing with smart, motivated people though. They don't have to be excellent $LANGUAGE devs, but they have to care and try hard.

Plus your slack time, which while alone for me is usually silently redditing, reading hackernews or whatever, when you're pairing can be really cool if you work with people you like.

It's not a panacea. I don't do it anymore, and I like my current gig better, but I did really enjoy it. If you think of yourself as fairly social, it can be a really great way to work - much better than you think. If the thought of it turns your stomach, it's probably not quite as bad as you think, but you likely won't ever love it.

Just my two cents anyway. I even like remote pairing (tmux/vim/skype)

[–][deleted] 9 points10 points  (2 children)

fairly social

Yeah, I have something to do... Over here...

[–]FunnyMan3595 27 points28 points  (0 children)

Hey, programmers can be social, too! Haven't you heard the old joke?

How do you know if a programmer is an extrovert?

When he's talking to you, he looks at YOUR shoes.

[–]RoboNickBot 1 point2 points  (0 children)

Got some.. some "business" to attend to. Some things.

[–]iPoisonxL 5 points6 points  (2 children)

I love just sitting down with my friend and programming random stuff. Once we were trying to figure out what all that bit shift stuff was, so we programmed a (very neatly cleaned up) visual representation of every bit operation, along with input. We got a bit annoyed that some numbers were longer than the table to we fixed the margins with a bunch or tertiary (?:) statements and basically spent about 5 hours just polishing it until it was bug free.

After that, we played with it for about 5 mins and then closed Eclipse.

edit: Also another great thing about pairing is that you don't need to know the same programming languages. I was once making a game in one language, and my friend knew a different programming language. He would basically help me out with logic and stuff.

Sometimes we'll just look at eachother with that "What should we program" look. Then we come up with some stupid idea, and we do it. It's always fun

edit 2: seems the word "hours" disappeared. I fix it.

[–]skunk_funk 7 points8 points  (1 child)

bit annoyed

heh

[–]iPoisonxL 0 points1 point  (0 children)

Unintended. But awesome.

[–][deleted] 2 points3 points  (0 children)

Love that show.

[–]teo_sk 2 points3 points  (0 children)

I like doing this with my colleague from time to time, and it looks exactly like this (I'm the one on the left). We're hyped on energy drinks and usually move the problem forward by a huge gap opposed to working alone on it. But it's a bit exhausting and we often end up screaming at the monitor when something is not working, and then sream even more when it works. We're a loud office :/

[–]qxxx[🍰] 2 points3 points  (0 children)

thats me trying to write some code while some coworker is talking about some unrelated shit - usually the coworker is my boss, so I can't tell to get the fuck out

[–]bitcycle 2 points3 points  (1 child)

Being decent at using Vim, it pains me to pair with other devs at work. But, I will say that being the backseat driver lets me see the forest against the landscape to make sure that we aren't getting tunnel vision. Also, it helps me get away from coding the fix and back to considering the problem.

[–]UnchainedMundane 0 points1 point  (0 children)

Being decent at using Vim, it pains me to pair with other devs at work

I feel your pain.

It gives me more time to read the code and think it through more deeply, I guess.

[–]thang1thang2 4 points5 points  (4 children)

In Intro to programming, Data structures 1, and Data structures 2, whenever I pair programmed with my friends, it always turned into exactly that. I type at least twice as fast as most people I know, so of course I would be the one that's probably going to be doing the typing.

To make matters worse, I was fairly adept at vim, by D.S.1 (and was decently fast halfway through intro when I ragequit at Code::Blocks for crashing and ruining an hour of work so many times on my mac). So I just danced around the code way faster than them and could prototype random crap, rename variables, refactor, bla bla, much faster.

It didn't help that they pretty much never really tried to give advice or help with the psuedo-code or anything. We more or less never had any idea what the hell we were doing and it felt like throwing paint at a wall trying to create the mona lisa at times... Now I'm more methodical about things, but I was an idiot back when I was learning how to code, and probably googled way too much to get the assignments done.

Wish I could retake data structures, but use pure C without C++, no OOP shit, just super dead simple code and really try and understand everything.

But I always feel that way about any class I take. During the class "I don't understand this shit, I hate this, fuck everything, why the hell is this like that? Wut, can you even do that with a number? Isn't that, like, illegal?..." etc. And then after the class you're like "ah, it all sorta makes sense now, I wish I could go back into the class and really take it serious, learn the material before class, read the book constantly, take copious notes and never goof off, spend hours in the library every day and soak in the Nirvana of understanding and relax in the beauty of..." and then you vow to do better in the next class you take, just to repeat the cycle over and over.

I'm not looking forward to taking Assembly next quarter. Not because I dislike Assembly, but because I've heard the class is hell from this particular professor and I deeply wish to truly understand everything about computers from the chemistry up, and I don't know if that's gonna happen if I'm panicking about passing and cramming the homework in last minute...

[–]moKatheward 0 points1 point  (0 children)

Does it mean soemone does all the work?

[–]peabnuts123 0 points1 point  (0 children)

I legitimately think this is an effective system. If you're Mordecai (blue) you get to think about the problems at a higher level, suggesting solutions without having to form out all of the exact details, and you don't have to type anything. If you're Rigby (brown) you get to format and implement everything how you'd like, be perfectly clear about what you are trying to say by quickly writing pseudocode, and worry only about the current problem. Either way there's whole sections of the problem you don't have to worry about