Bork Bork!
 FAQ  •  Search  •  Memberlist  •  Usergroups   •  Register  •  Profile  •  Log in to check your private messages  •  Log in
 Blizzard is hiring again! View next topic
View previous topic
Post new topicReply to topic
Author Message
The Yellow Dart
Lifeless Reject


Joined: 09 May 2003
Posts: 3734

PostPosted: Tue May 10, 2005 6:11 am Reply with quoteBack to top

Enjoy, techies....

http://www.blizzard.com/jobopp/

_________________
"If there is a God, and if I ever meet him, I'm just going to kick him in the balls over and over."
- Penny Arcade

"Laura, it was nice boozin with your UD friends. I'll happily share another blowjob with them anytime." - Christi
View user's profileSend private message
Uty
Tang Soo Techie


Joined: 03 May 2003
Posts: 9583
Location: On a never ending quest to save my girlfriend

PostPosted: Tue May 10, 2005 8:54 am Reply with quoteBack to top

What I need to do is get a years salary saved up ... or just what I'd need to get by a year somewhere cheap like Madison ... take off of work and make a game. It really helps you get in the industry.

I am pretty sure with an artist and a sound guy I can make something about as neat as Final Fantasy IIe

_________________
Roses are #FF0000
Violets are #0000FF
All my base
Are belong to you
View user's profileSend private messageSend e-mailAIM Address
The Yellow Dart
Lifeless Reject


Joined: 09 May 2003
Posts: 3734

PostPosted: Tue May 10, 2005 11:04 am Reply with quoteBack to top

Uty, you could probably stand a good chance of getting one of those programmer jobs. There's nothing in there about previous gaming experience. It's all C/C++ anyway.

_________________
"If there is a God, and if I ever meet him, I'm just going to kick him in the balls over and over."
- Penny Arcade

"Laura, it was nice boozin with your UD friends. I'll happily share another blowjob with them anytime." - Christi
View user's profileSend private message
Uty
Tang Soo Techie


Joined: 03 May 2003
Posts: 9583
Location: On a never ending quest to save my girlfriend

PostPosted: Tue May 10, 2005 11:50 am Reply with quoteBack to top

It is a matter of competitiveness ... shitloads of people apply for these jobs. The guy who has actually gone through the effort of making a game (and thus also providing quite the code sample) tends to get the job. All the industry insiders agree on this.

_________________
Roses are #FF0000
Violets are #0000FF
All my base
Are belong to you
View user's profileSend private messageSend e-mailAIM Address
Vanblade
Lifeless Reject


Joined: 03 May 2003
Posts: 2911
Location: My pants are haunted!

PostPosted: Tue May 10, 2005 11:53 am Reply with quoteBack to top

I might still have the chess game I made for my java class
View user's profileSend private messageSend e-mail
jewles
Satanist Bitch


Joined: 02 May 2003
Posts: 920
Location: Newark, DE

PostPosted: Tue May 10, 2005 12:41 pm Reply with quoteBack to top

Ah but they actualy have to like your code sample. Remeber, I've seen your code (although maybe it has improved since school).
View user's profileSend private messageSend e-mailAIM Address
Uty
Tang Soo Techie


Joined: 03 May 2003
Posts: 9583
Location: On a never ending quest to save my girlfriend

PostPosted: Tue May 10, 2005 1:22 pm Reply with quoteBack to top

My code rules ... you'll never admit it but during the Java project your decisions made it more complicated. I always advocated seperate client/server classes.

_________________
Roses are #FF0000
Violets are #0000FF
All my base
Are belong to you
View user's profileSend private messageSend e-mailAIM Address
jewles
Satanist Bitch


Joined: 02 May 2003
Posts: 920
Location: Newark, DE

PostPosted: Tue May 10, 2005 2:27 pm Reply with quoteBack to top

Maybe Java is your language then cuz you came up with bugs in C++ that were extremly strange. Like running out of memory in between the call to a method and the first line of that method. Besides I remember telling you to do that network layer however you wanted so long as it worked.
View user's profileSend private messageSend e-mailAIM Address
Uty
Tang Soo Techie


Joined: 03 May 2003
Posts: 9583
Location: On a never ending quest to save my girlfriend

PostPosted: Tue May 10, 2005 2:34 pm Reply with quoteBack to top

Nah I remember bitching about the design decisions with Bob as we coded it.

Anyway, yeah, lots of odd C++ errors. Then again the one you refer to was because I had designed an object that took up so much memory the size of the stack would exceed my allocated amount so the program would crash. Had it been on my own box it would have worked. Of course if I had programmed with effective memory usage I would have avoided the problem too.

_________________
Roses are #FF0000
Violets are #0000FF
All my base
Are belong to you
View user's profileSend private messageSend e-mailAIM Address
Vanblade
Lifeless Reject


Joined: 03 May 2003
Posts: 2911
Location: My pants are haunted!

PostPosted: Tue May 10, 2005 3:02 pm Reply with quoteBack to top

did his code look like dodd's code?


man, that shit was painful to look at!
View user's profileSend private messageSend e-mail
Uty
Tang Soo Techie


Joined: 03 May 2003
Posts: 9583
Location: On a never ending quest to save my girlfriend

PostPosted: Tue May 10, 2005 3:11 pm Reply with quoteBack to top

Eh ... dunno. I never saw his code. But I'll show you all mine! This perl script writes mutators/accessors in Java. Don't mind the copyright ... the project manager later decided he did not need this code. So from BCSI perspective it is officially junked.

Code:

#!/usr/bin/perl -w
#==========================================================================
# Copyright (C) 2000-2004, Laurel Bridge Software, Inc.
# 160 East Main St.
# Newark, Delaware 19711 USA
# All Rights Reserved
#==========================================================================

use strict;
use Getopt::Long;
use FileHandle;
use File::Basename;

sub fieldsFromFile();         # Acquire fields from a file.
sub fieldsFromSTDIN();         # Acquire fields from STDIN.
sub processField($);         # Turn a line of text into a hash suitable for pushing onto @fields.
sub fieldsToCode(@);         # Turn @fields into code.
sub writeOutput($);            # Write the generated code.

my $inFile = undef;
my $outFile = undef;
my $verbose = 0;
my $help = 0;
my $myname = basename( $0 );
my @fields;                  # Array of hash references.
                        # Hash keys include: name, type, description
my $usage = <<_END_OF_USAGE_;
${myname} creates Java mutators and accessors for given fields.  Fields consist
of three parts - a name, a type, and a description.  Below are some examples.

called_ae_title String The called Application Entity Title.
timeout int A timeout value.

The name is always the first word.  The type is always the second word.  The
description is everything after the second word up to the newline character.
${myname} will create the following output for the timeout field.

/**
 * A timeout value.
 */
 private int timeout_;

/**
 * Get the timeout.
 * \@returns timeout.
 */
public int getTimeout()
{
   return timeout_;
}

/**
 * Set the timeout.
 * \@param timeout New value for timeout.
 */
public void setTimeout( int timeout )
{
   timeout_ = timeout;
}

Usage:
perl ${myname} [options] -out <file>

Options
-help: print this message.
-out: the file ${myname} output will be written to.  Required.
-in: the file Fields will be acquired from.  If this option is not used,
Fields will be acquired from STDIN.  Type "END" when finished providing input.
-verbose: causes ${myname} to function in verbose mode.
_END_OF_USAGE_

Getopt::Long::config( 'default', 'ignore_case', 'auto_abbrev', 'require_order' );
GetOptions(
         'help'      =>   \$help,
         'in=s'      =>   \$inFile,
         'out=s'      =>   \$outFile,
         'verbose'   =>   \$verbose )
   or die( $usage );

if( $help )
{
   warn( $usage );
   exit 0;
}

unless( defined $outFile )
{
   warn( $usage );
   die( "\n\n${myname}: error: -out (required) not used.\n" );
}

if( defined $inFile && not -e $inFile )
{
   die( "\n\n${myname}: error: file specified by -in does not exist.\n" );
}

@fields = ( defined $inFile ) ? fieldsFromFile() : fieldsFromSTDIN();
my $code = fieldsToCode( @fields );
writeOutput( $code );

# Acquire Fields from a config file.
# The fields will take the form: name type description
# Description can be multiple words, name and type are just one.
sub fieldsFromFile()
{
   my @fileFields;
   my $IN = new FileHandle( "< ${inFile}" )
      or die( "${myname}: error opening ${inFile} for read: $!\n" );
   my @lines = <$IN>;   
   close $IN;

   foreach my $line ( @lines )
   {
      my $entry = processField( $line );
      defined $entry and push @fileFields, $entry;
   }

   return @fileFields;
}

# Acquire Fields from STDIN
# The fields will take the form: name type description
# Description can be multiple words, name and type are just one
# Typing "END" will cease input collection.
sub fieldsFromSTDIN()
{
   print "Type in Fields.  (Name Type Description).  Type \"END\" when finished.\n\n";
   my $continue = 1;
   my $line = "";
   my @stdinFields;
   
   while( $continue )
   {
      $line = <STDIN>;
      if( $line =~ m/^\s*END\s*$/ )
      {
         $continue = 0;
      }
      else
      {
         my $entry = processField( $line );
         defined $entry and push @stdinFields, $entry
      }
   }

   return @stdinFields;
}

# Process a line.  If it isn't malformed, turn it into a hash
# suitable for pushing onto @fields.  If it is malformed,
# warn the user (if verbose) and return undef.
sub processField($)
{
   my $line = shift;
   if( $line =~ m/^\s*(\w+)\s+(\w+)\s+(.+)\n$/ )
   {
      my %entry;
      $entry{name} = $1;
      $entry{type} = $2;
      $entry{description} = $3;
      return \%entry;
   }
   elsif( $verbose )
   {
      chomp $line;
      warn( "${myname}: \"${line}\" does not match Field conventions.\n" );
      return undef;
   }
}

# Turn Fields (hash references containing name, type, and description) into
# appropriate code.  Everything is returned as a scalar string.
sub fieldsToCode(@)
{
   my $declarations;      # private Type Name
   my $mutators;         # setName
   my $accessors;         # getName
   
   foreach my $fieldReference ( @_ )
   {
      my %field = %{$fieldReference};
      my $name = $field{name};
      my $type = $field{type};
      my $description = $field{description};

      my $convertedName = $name;            # convertedName: my_variable_name becomes myVariableName
      my @tokens = split /_/, $convertedName;
      foreach my $token ( @tokens )
      {
         if( $token =~ m/^(\w)/ )
         {
            my $firstLetter = $1;
            my $upperCase = uc( $firstLetter );
            $token =~ s/^$firstLetter/$upperCase/;
         }
      }
      $convertedName = join "", @tokens;
      
      my $declaration = <<_END_OF_DECLARATION_;
   /**
    * ${description}
    */
    private ${type} ${name}_;
_END_OF_DECLARATION_

      my $accessor = <<_END_OF_ACCESSOR_;
   /**
    * Get value of ${name}_
    * \@returns ${name}_
    */
    public ${type} get${convertedName}()
    {
       return ${name}_;
    }
_END_OF_ACCESSOR_

      my $mutator = <<_END_OF_MUTATOR_;
   /**
    * Set value of ${name}_
    * \@param ${name} New value for ${name}_
    */
    public void set${convertedName}( ${type} ${name} )
    {
       ${name}_ = ${name};
    }
_END_OF_MUTATOR_

      $declarations .= $declaration . "\n";
      $accessors .= $accessor . "\n";
      $mutators .= $mutator . "\n";
   }

   my $code = $declarations . "\n" . $accessors . "\n" . $mutators . "\n";
   return $code;
}

# Write the generated code to $outFile.
# If $outFile does not exist, create it and write the code.
# (Obviously this won't compile.)
# If $outFile does exist, open it and determine where the
# class declaration is.  Insert output after that.
sub writeOutput($)
{
   my $output = shift;
   if( -e $outFile )
   {
      my $insertLocation = undef;
      my $IN = new FileHandle( "< ${outFile}" )
         or die( "${myname}: error opening ${outFile} for input: $!\n" );
      my @lines = <$IN>;
      close $IN;

      for( my $counter = 0; $counter < scalar @lines && not defined $insertLocation; $counter++ )
      {
         if( $lines[$counter] =~ m/\s*public class/ )
         {
            $insertLocation = ( $lines[$counter] =~ m/{/ ) ? $counter + 1 : $counter + 2;
         }
      }

      splice( @lines, $insertLocation, 0, $output );

      my $OUT = new FileHandle( "> ${outFile}" )
         or die( "${myname}: error opening ${outFile} for output: $!\n" );
      print $OUT @lines;
      close $OUT;
   }
   else
   {
      my $OUT = new FileHandle( "> ${outFile}" )
         or die( "${myname}: error opening ${outFile} for output: $!\n" );
      print $OUT $output;
      close $OUT;
   }
}

_________________
Roses are #FF0000
Violets are #0000FF
All my base
Are belong to you
View user's profileSend private messageSend e-mailAIM Address
Vanblade
Lifeless Reject


Joined: 03 May 2003
Posts: 2911
Location: My pants are haunted!

PostPosted: Tue May 10, 2005 3:54 pm Reply with quoteBack to top

that looks a lot better
he never indented

and hated using new lines or spacing
View user's profileSend private messageSend e-mail
Uty
Tang Soo Techie


Joined: 03 May 2003
Posts: 9583
Location: On a never ending quest to save my girlfriend

PostPosted: Tue May 10, 2005 4:09 pm Reply with quoteBack to top

He hated using newlines? So ... like ... the entire program would just be one line? "The compiler strips all the whitespace out anyway!"

_________________
Roses are #FF0000
Violets are #0000FF
All my base
Are belong to you
View user's profileSend private messageSend e-mailAIM Address
Vanblade
Lifeless Reject


Joined: 03 May 2003
Posts: 2911
Location: My pants are haunted!

PostPosted: Tue May 10, 2005 4:24 pm Reply with quoteBack to top

he liked having all output on one line
or as few lines as possible
View user's profileSend private messageSend e-mail
Stealthr4v3r
Mother Superior


Joined: 02 May 2003
Posts: 3113
Location: West Chester, PA

PostPosted: Tue May 10, 2005 4:40 pm Reply with quoteBack to top

Uty wrote:
But I'll show you all mine! This perl script writes mutators/accessors in Java.


you do know that violating encapsulation is bad right? Smile

I hope those were at least javabeans...
View user's profileSend private messageAIM Address
Display posts from previous:      
Post new topicReply to topic


 Jump to:   



View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2002 phpBB Group :: FI Theme :: All times are GMT - 5 Hours