Catch up on stories from the past week (and beyond) at the Slashdot story archive

 



Forgot your password?
typodupeerror
×
User Journal

Journal FortKnox's Journal: Ask (a subset of) Slashdot: Code Samples 18

A gaming company wants me to submit my resume and code samples.

What code samples should I send??
Demo'ing a pattern? Using something fancy like multithreaded sockets? Something clever I came up with (although nothing clever comes to mind)... I probably shouldn't stall on this, and I don't really have code lying about, so any suggestion I can whip up would be great.
This discussion has been archived. No new comments can be posted.

Ask (a subset of) Slashdot: Code Samples

Comments Filter:
  • What position are you applying for, graphics programming?

    If so, look through NeHe's OpenGL tutorial [gamedev.net].

    Whip up a nice 3d World highlighting all the cool features (textures, bump-mapping, phong, gouraund and specular reflection, good anti-aliasing, fog, particles, swarm, text and basic movements).

    This way, you get to show people that you can code all the cool stuff in graphics.

    If it is AI, then you could show a bunch of simple agents and swarms, maybe subjective behaviour and the like (I know that this is w
    • Its a networking job. Networked game, eh? I wonder if a simple mud engine would work? Or should I look into using UDP instead of TCP/IP??
      • i don't know network code, but i play games online. after configuring my firewall for enough games, i'd say UDP isn't used much anymore. almost everything is using good old tee cee pip.

        i'm glad to see you haven't completely given up on the idea.
      • can you use google or something to find examples of what other people are showing off in similar circumstances? maybe a bad idea, but you can't deny that it is an idea. a certain bad idea would be copying any of those examples.
      • Try Ipv6, that would pry impress them.
      • I think a simple MUD engine would be a neat idea.

        You could write simple implementations using both UDP and TCP/IP, and say why you think one is better than the other. Back in the days of yore, people used to write only using UDP, since they said that the ack took time and therefore TCP/IP is slower. But we're beyond that stage, and since games these days have tonnes of other features and the like, UDP would no longer do. Besides, latency is not as big a problem as it was, say, 10 years ago :)

        You should lo
      • Its a networking job. Networked game, eh? I wonder if a simple mud engine would work? Or should I look into using UDP instead of TCP/IP??

        How about a nicely structured event-driven webserver? That manages to pack in quite a few useful things - JNI, hashtables, parsing, buffer management, I/O and file access, some security awareness - all in a couple of pages.

        A simple (recursion only, maybe with caching) DNS server would probably be a good demo of UDP handling, too, without getting too caught up in small

        • How about a nicely structured event-driven webserver? That manages to pack in quite a few useful things - JNI, hashtables, parsing, buffer management, I/O and file access, some security awareness - all in a couple of pages.

          Agreed, with a couple of caveats. JNI? This is a gaming company. The concept of writing a game in Java fills me with horror. The mantra for gaming is engine in C, game logic in a scripting language. Java is a poor choice for either. That said, if I was hiring a coder, I'd be looking les

          • JNI? This is a gaming company. The concept of writing a game in Java fills me with horror. The mantra for gaming is engine in C, game logic in a scripting language. Java is a poor choice for either.

            Good point - I was remembering FK's previous talk about Java, so I assumed he was after Java code samples... I'd be inclined to go for Java over most scripting languages for the logic end, though, especially when it's intended to be multiplayer. Java wouldn't be my first choice of language for very many things,

  • How about a two player battleship game? Give you a chance to show off some graphics toolkits (like OpenGL or DirectX), simple rule/logic checking without making complex AI, and networking if you build two clients that talk to a server... Something that could be done in a weekend if you avoided the hard bits.

    Better to ask them what types of code examples they would like to see. Who knows, maybe a simple AD&D character generator in C++ is all they are after - just enough to know you can produce clean,
  • Submit code of what you've done. It doesn't really matter what it is of, but for every snippit you submit, make sure you explain what it does and why you chose it. Something like:
    Here is a sample toy I created. All it is is a bouncing ball in gravity. Clicking on it makes it bounce. It shows my use of sprites, user interaction/input capture, graphics, etc ...

    That's all they're really looking for, that and your coding technique. Do you code well, follow proper naming conventions, commenting, etc..
  • by stating I'm not a coder by profession. I'm mostly a hack (in the 'bad' sense of the word). So take what I say with a grain of salt. I'm also going to be general, instead of saying something like 'how about a networked Tetris clone?'

    First, I would send code that is commented well. That could be an important extra positive. Did they ask for a particular language? If not, several code snippets from whatever their primary thing is, plus a couple of other things - for a gaming company, a scripting lan

  • i would get together your best ding-dang multi-threaded server code you have. One of my "go-to" pieces of code is about 5 years old (some day I'll revamp it) but basically its a chat/IM server I was developing (just to learn) and it came out pretty slick-like and whenever I showed it to anyone, including the last time I was looking for employment, it always scored points.

    Plus, the sounds of it, its the most relevant.

  • I'd want to see some code that demonstrates that you were faced with a unique problem and found a creative solution. It doesn't matter what the code does. I would just want to know if you can approach the problem differently when needed.

    Also, some different programming languages could be a boost. Any programmer worth their paycheck should be capable of handling the same concepts using different languages. Shows you understand the theories behind things instead of remembering an example from some book.
  • I dropped out of a CS program, so take this with however large a grain of salt you feel necessary:
    Include somewhere an example of a solution to a near-trivial problem, commented. My favourite is a strobe light with a speedup-on-keypress (and even a debounce subroutine) written in assembler for an 8051 controller; second is a route finder in Prolog, which is a terrible language for imperative-style problems.
    This lets them see your style much better than an elegant hack to a hard task, or any working sol
  • It sounds like some people are recommending that you bang something out. I wouldn't. Go with something that you've written. Clean it up if you like. But your odds are better of not doing something stupid by going with something that's already time tested. Especially if time is not on your side.

    I vote for something particularly elegant. And I'm deliberately being vague because that means different things to different geeks :). But I think you get my meaning -- there are times to show off how enterp


  • ...make sure you don't submit any Java code. :-D

  • This journal entry kind of weirded me out (hence the waiting such a long time to add a reply). A game company had asked me to send in a code sample as well, and I was in the middle of coding it when I read this entry. My first thought was, "I'm competing against someone I know on Slashdot for a job". Then you mentioned that it was a networking position, which couldn't possibly be the job I was applying for.

    I don't know why it took so long for me to realize this, but it seems like a good demo is the key to

I tell them to turn to the study of mathematics, for it is only there that they might escape the lusts of the flesh. -- Thomas Mann, "The Magic Mountain"

Working...