• Hey, guest user. Hope you're enjoying NeoGAF! Have you considered registering for an account? Come join us and add your take to the daily discourse.

Programming |OT| C is better than C++! No, C++ is better than C

That's my problem right now, really. I don't spend any time outside of class learning it, and I only open the book in class to do the exercises with the class but when I leave class, I don't do anything with it. I actually like programming too, it's just that I haven't had the motivation to do anything when I'm not really required to.

Just remember if you want to do programming, it isn't really a job, it is a life.
 

Kikarian

Member
That's my problem right now, really. I don't spend any time outside of class learning it, and I only open the book in class to do the exercises with the class but when I leave class, I don't do anything with it. I actually like programming too, it's just that I haven't had the motivation to do anything when I'm not really required to.
Set your self a project to complete when you're not in class. It should help you gain motivation to learn.
 
Hey guys. I've got a list something like this, in F#.

Again, I don't know if this is considered best practice in F# but something like this is what you want:

Code:
let answers = List.map (fun (_, ans) -> List.filter (fun c -> c = "a") ans) choice
List.map List.length answers

We map a filter function that only allows answers that are "a" through. So we end up with a list of the "a"s in the second element of each tuple in the original list.
Then we just map the length function to that list, giving the count of items that matched the pattern in the original list.
 

Godslay

Banned
That's my problem right now, really. I don't spend any time outside of class learning it, and I only open the book in class to do the exercises with the class but when I leave class, I don't do anything with it. I actually like programming too, it's just that I haven't had the motivation to do anything when I'm not really required to.

Reading is one thing, doing is another. Best way to learn imo, is to actually program. Reading only gets you so far.
 

Fiftyeight

Neo Member
Hey dudes, I'm taking an intro to C class and I'm having a lot of trouble with this project:

Problem Statement

After a successful career solving all of the world’s toughest cryptography problems for Acme Cryptography Division, you have decided that you want to see the world. This is why you’ve requested a transfer to work for the Acme Travel Agency.

The Acme Travel Agency specializes in airline travel, and due to your quality assurance experience, you are assigned to analyze the quality of different flight plans. A flight plan consists of N connecting flights. After each flight except for the last one, there is a layover period in which the passenger must wait for the next flight. You have been tasked to calculate the destination time (without taking into account time zone changes), as well as the quality of the flight plan.

If the total time that a passenger is flying as at least two times greater than the time in layover, a flight plan is considered to be efficient. Otherwise, a flight plan is considered to be inefficient.

To calculate the destination time, add the total trip duration (the sum of all flight a layover durations) to the departure time, and calculate the corresponding time in a 24-hour clock format. Note that flight plans may last overnight, or may have a duration greater than a day. As an example, if a flight plan departed at 09:30 and lasted for 2000 minutes (that’s a long flight plan!), the destination time would be 18:50 the next day. As such, you would report 18:50 as the destination time.

Input Specification

Input will begin with a line single integer, N (1 <N< 50). On the next line, you are given two integers H (0 <H< 23) and M (0 <M< 59). This denotes the departure time as H:M, the Mth minute of the Hth hour. On each of the following N-1 lines, there will be two integers, F (1 <F< 1440) and L (1 <L< 1440), where F is the duration of the flight in minutes, and L is the duration of the following layover, also in minutes. Input is concluded by one final line containing a single integer F, the duration of the final flight.




Output Specification

Your program should output the arrival time and the quality of the flight. This should be formatted in the following way:

This flight plan is S, and will conclude at HH:MM.

where S is a string: either “efficient” or “inefficient” depending on the quality of the flight as defined in the Problem Statement. HH:MM is the 24-hour time of the destination as defined in the Problem Statement.






Sample I/O


Input:

1
7 45
75

Output:

This flight plan is efficient, and will conclude at 09:00.


Input:

2
13 30
75 180
85

Output:

This flight plan is inefficient, and will conclude at 19:10.

Input:

3
12 27
500 300
600 400
300

Output:

This flight plan is efficient, and will conclude at 23:27.

Essentially, I know what I have to do. It's HOW to do it that's the tricky part; I'm sure that's the main problem in coding, though. I'm still not quite up to speed with loops, and since our current instructor is still a student himself, he doesn't yet have the qualities of getting his ideas and points across as thoroughly as other, more seasoned instructors.

Any ideas?
 

tokkun

Member
Essentially, I know what I have to do. It's HOW to do it that's the tricky part; I'm sure that's the main problem in coding, though. I'm still not quite up to speed with loops, and since our current instructor is still a student himself, he doesn't yet have the qualities of getting his ideas and points across as thoroughly as other, more seasoned instructors.

Any ideas?

If you don't understand loops, hit your textbook and visit your instructor/TA's office hours until you do, because you will need them to solve this problem.

Here is the systematic advice I give to students when they're trying to solve a problem. The same advice works whether we're talking about writing a program, designing digital logic, solving a chemistry problem, or solving any complex technical problem.

1. Clearly identify the inputs and outputs of your problem (i.e. what information is given to you and what do you need to calculate). Also make note of any important restrictions. This should all be in the problem description, but it helps to re-write it yourself to eliminate the fluff from the problem description.
2. If the problem is complex, divide it into smaller sub-problems that are easier to reason about. For example, in your problem you clearly need to:
-Read in some input data
-Compute flight and layover durations
-Compute arrival time at the destination
3. For each of the sub-problems, repeat step 1. Determine what information you need and what information you will produce. Make sure that you have (or can produce) all the information you need as inputs to each sub-problem.
4. For each sub-problem, write a brief description of the steps to solve it. This can be done in plain speech, psuedocode, mathematical notation, or whatever you feel comfortable with. If any step seems overly complicated, you should probably break it down into another sub-problem.
5. Piece-by-piece, write code to implement the steps from problem 4. Each time you finish writing code for one of the sub-problems, test it by itself and see if the results you are producing seem to make sense.

At some point when trying to get from step 4 to step 5, you may run into a situation where you say "I know I need to do X, but I don't know the syntax to do it in C". At that point you can ask your instructor or NeoGAF, and you will actually know what you are asking.
 

Mabef

Banned
Hey dudes, I'm taking an intro to C class and I'm having a lot of trouble with this project:
...
Any ideas?
I don't know anything about C (me C++ noob), but you might get better help if you're more specific about what you're struggling with? Have you started? A good starting point, I've found, is translating the instructions into fake code, like:
Code:
if timeFlying >= layover * 2
[INDENT]efficient = yes[/INDENT]etc...




My own question:
I want to edit a geektool script for the desktop of my Mac. Problem is, I don't know anything about the language (bash? is that a language?), and it looks like the program was originally written in German.
Code:
#!/bin/bash
#
# Aktuelle Staatsverschuldung der BRD
# Grundlage ist ein Zuwachs / Sekunde von 4.481 (Stand 20.06.10)

let Verschuldungfix=1720690247715
let FixAbzug=5722183008431
let AktZeit=`date +%s`

let AktZeitMalZuwachsProSekunde=$AktZeit*4481
let AktuelleVerschuldung=$Verschuldungfix+AktZeitMalZuwachsProSekunde-$FixAbzug+479000

echo "PUBLIC debt of GERMANY"
echo "$AktuelleVerschuldung €&#8232;"
Output is: "PUBLIC debt of GERMANY: [number]€". I'd assumed the program was pulling the data from a website, but the code it seems to be adding it up based on my computer's date. Could I instead pull the data from this website? I tried editing my Yahoo weather script, but it's a formatting mess that I can't figure out.

Yahoo:
Code:
curl --silent "http://weather.yahooapis.com/forecastrss?p=USTX0353&u=f" | grep -E '(Current Conditions:|F<BR)' | sed -e 's/Current Conditions://' -e 's/<br \/>//' -e 's/<b>//' -e 's/<\/b>//' -e 's/<BR \/>//' -e 's/<description>//' -e 's/<\/description>//'
 
Prolog is not a functional language, it is a Logic Programming language, it can be more or less imperative or declarative depending on how you write it. I think that this is the standard disclaimer I give for these things but I know almost nothing about Prolog other than that. I do know though that http://www.learnprolognow.org/ is meant to be good, and it's also relatively recent (2003).

Bruce Tate's 7 Languages in 7 Weeks has a nicely written up gentle introduction to the language and many of the go to reference books for AI, such as Russell and Norvig's Artificial Intelligence: A Modern Approach contain very good explanations of the inference and forward chaining algorithms (and unification!) that make the language work.

edit: derp on the unification
 

Bollocks

Member
Anyone know a good freelance site where I can make a quick buck?
The one's I found look really dodgy and consist almost entirely of automated scripts ._.
 

jokkir

Member
Can anyone tell me why this code isn't reassigning the value?

Code:
if(rawData[i] == '<' && rawData[i+1] == '<'){
	i+=2;
	temp_string[j] = rawData[i];//-frequency;
	temp_string[j] = temp_string[j]-frequency;
	//i++;
	//j++;
}

What I want to do is it changes the alphabetical value of what's in temp_string by the amount that's in frequency. It doesn't seem to want to change though.
 

usea

Member
Can anyone tell me why this code isn't reassigning the value?

Code:
if(rawData[i] == '<' && rawData[i+1] == '<'){
	i+=2;
	temp_string[j] = rawData[i];//-frequency;
	temp_string[j] = temp_string[j]-frequency;
	//i++;
	//j++;
}

What I want to do is it changes the alphabetical value of what's in temp_string by the amount that's in frequency. It doesn't seem to want to change though.
Your code decrements temp_string[j] by frequency. I don't know what j is or where it's coming from. And I don't know what frequency is. And I don't know if the condition in your if-statement is ever true. But assuming the condition is true, then your code should do what you expect: it changes the value of temp_string[j] by subtracting frequency.
 

jokkir

Member
Your code decrements temp_string[j] by frequency. I don't know what j is or where it's coming from. And I don't know what frequency is. And I don't know if the condition in your if-statement is ever true. But assuming the condition is true, then your code should do what you expect: it changes the value of temp_string[j] by subtracting frequency.

temp_string is a char variable while frequency is a int variable. What it's supposed to do is that if it finds two less tha nor greater than signs, it changes the next alphabetical value of it by the amount in frequency. Here's the function for it.

Code:
long decode_msg(const char rawData[], char signal[], int third_match_val, int a, int b, int frequency ){	
	int i = 0;
	int j = 0;
	long result = 0;
	char temp_string[100] = "";
	
	for(i = third_match_val; i < strlen(rawData) || rawData[i] != '\0'; i++){
		switch(rawData[i]){
			case '>':
				if(rawData[i] == '>' && rawData[i+1] == '>'){
					i+=2;
					temp_string[j] = rawData[i];//+frequency;
					temp_string[j] = (temp_string[j]+frequency);
					//i++;
					//j++;
				}
			case '<':
				if(rawData[i] == '<' && rawData[i+1] == '<'){
					i+=2;
					temp_string[j] = rawData[i];//-frequency;
					temp_string[j] = (temp_string[j]-frequency);
					//i++;
					//j++;
				}
			default:
				if(rawData[i] >= a && rawData[i] <= b){
					printf("in between a & b ascii values!\n");
					temp_string[j] = rawData[i];
					j++;
				}
	return result;
}

It doesn't seem to want to chage the value though.

EDIT - I think I figured out my problem >__>
 
Just got done with an onsite at one of the top-tier tech companies. Would anyone be interested in an overview of the process and the questions I was asked?
 

tokkun

Member
temp_string is a char variable while frequency is a int variable. What it's supposed to do is that if it finds two less tha nor greater than signs, it changes the next alphabetical value of it by the amount in frequency. Here's the function for it.

Code:
long decode_msg(const char rawData[], char signal[], int third_match_val, int a, int b, int frequency ){	
	int i = 0;
	int j = 0;
	long result = 0;
	char temp_string[100] = "";
	
	for(i = third_match_val; i < strlen(rawData) || rawData[i] != '\0'; i++){
		switch(rawData[i]){
			case '>':
				if(rawData[i] == '>' && rawData[i+1] == '>'){
					i+=2;
					temp_string[j] = rawData[i];//+frequency;
					temp_string[j] = (temp_string[j]+frequency);
					//i++;
					//j++;
				}
			case '<':
				if(rawData[i] == '<' && rawData[i+1] == '<'){
					i+=2;
					temp_string[j] = rawData[i];//-frequency;
					temp_string[j] = (temp_string[j]-frequency);
					//i++;
					//j++;
				}
			default:
				if(rawData[i] >= a && rawData[i] <= b){
					printf("in between a & b ascii values!\n");
					temp_string[j] = rawData[i];
					j++;
				}
	return result;
}

It doesn't seem to want to chage the value though.

EDIT - I think I figured out my problem >__>

There are a variety of issues with this code.

First, seems like some braces are missing.
Why are you using a switch statement?
If you are going to use a switch statement, you probably want to add 'break' to the end of your cases.
You probably want the upper limit on your for loop to be 'strlen(rawData) - 2'.
As far as I can tell, this function always returns zero, since you never change 'result' after initializing it.
You also never seem to do anything with the data stored in 'temp_string'.
Seems like you should be incrementing j every iteration...
 

jokkir

Member
There are a variety of issues with this code.

First, seems like some braces are missing.
Why are you using a switch statement?
If you are going to use a switch statement, you probably want to add 'break' to the end of your cases.
You probably want the upper limit on your for loop to be 'strlen(rawData) - 2'.
As far as I can tell, this function always returns zero, since you never change 'result' after initializing it.
You also never seem to do anything with the data stored in 'temp_string'.
Seems like you should be incrementing j every iteration...

Oh sorry. That was just part of the function you're seeing because there's a lot of unnecessary things there that's not part of my question. There is a return value and all the braces are there
 
I would, since I'm gonna be job-searching soon.
Here's a basic overview: 5 interviewers, 45 minutes each, and a lunch on campus (the person you go to lunch with does not submit hiring feedback). Where the question was specific to a certain programming language, I've put the language in parentheses. For the record, I am a front-end programmer, primarily working in Javascript and Objective C at the moment. I have also worked with C++ on graphics libraries in the past.

#1 (Code):
  • Overview of one of the teams I was interviewing for and the problems they are looking to solve (with lots of time for discussion of that problem).
  • Search for an integer in a binary search tree - if the value is not found, return the nearest value that is in the tree

#2 (Code):
  • "Tell me something about yourself that's not on your resume"
  • If you were starting a new project, what language would you choose and why?
  • Given an array of integers that are to be excluded and another integer n (the maximum value), generate a uniform random number from 0 to n-1 (excluding any numbers in the array)
  • (Java) Iterator is an interface that has a next() and a hasNext() method (note that next consumes the value it was pointing to each time it was called - i.e. calling next a second time will yield a different result). Design a class that takes an iterator and adds peek() functionality to it.

Lunch:
Lots of time to ask about various exciting aspects of the company in question

#3 (High level design and debugging):
  • Hardest recent bug
  • Issues when upgrading to a new iOS SDK
  • Automated testing and a few other questions trying to glean what sort of familiarity I had with debugging and fixing things that are broken
  • Very high-level design question: Design an internationalization system given coders writing various components in code and translators who don't want to see or understand any code (not even JSON)

#4 (Algorithms):
  • Given an m x n matrix sorted in both dimensions (i.e. if a number is lower than or to the right of a given position, it is greater than or equal to the number at that position), search for an integer x

#5 (Code):
  • What is the future language of the web (and why)?
  • Talk about some design considerations for a web graphics API
  • (Javascript) Create a QuadTree (used in image processing, each node can have 4 children, corresponding to quadrants of an image, the leaves of the tree have a pixel value representing the color of that region in the image - note that leaves can be at different depths in the tree, an indication that there are varying pixel densities)
  • (Javascript) Design an algorithm to merge two QuadTrees into a combined image, given an averagePixel function that takes two pixels and returns their average
 

nan0

Member
Here's a basic overview: 5 interviewers, 45 minutes each, and a lunch on campus (the person you go to lunch with does not submit hiring feedback). Where the question was specific to a certain programming language, I've put the language in parentheses. For the record, I am a front-end programmer, primarily working in Javascript and Objective C at the moment. I have also worked with C++ on graphics libraries in the past.

This makes me fear future interviews. I recently graduated and I was looking into software development as well (though not JS and Obj. C), but I couldn't solve any of these algoritmic questions. Never did that stuff in my studies. Was this for a Senior developer job?
 
This makes me fear future interviews. I recently graduated and I was looking into software development as well (though not JS and Obj. C), but I couldn't solve any of these algoritmic questions. Never did that stuff in my studies. Was this for a Senior developer job?

I would guess probably not. The "hot" companies will nail you with lots of data structures and algorithm questions. Smaller, non-startup, companies in my experience tend to ask more questions about personality fit, and some coding questions just to make sure you do have some "very" basic skills.
 
Okay, I took a week break off from reading Head First but I'm going to resume it and code more. I saw this site on another thread: http://www.programr.com/zone/java but it keeps giving me errors("error: exception occured.") when I submit codes that work. Which sucks since this is the only interactive java site I've found. Anyone know why this happens?

Or maybe someone can suggest sites that give exercises for java? I feel like I need to code more rather than just read and do the exercises in Head First.
 
Okay, I took a week break off from reading Head First but I'm going to resume it and code more. I saw this site on another thread: http://www.programr.com/zone/java but it keeps giving me errors("error: exception occured.") when I submit codes that work. Which sucks since this is the only interactive java site I've found. Anyone know why this happens?

Or maybe someone can suggest sites that give exercises for java? I feel like I need to code more rather than just read and do the exercises in Head First.

Why do you need an interactive java site? Download Eclipse and start coding simple tools like a console based App to do your grocery list, or keep track of a game collection.
 
This makes me fear future interviews. I recently graduated and I was looking into software development as well (though not JS and Obj. C), but I couldn't solve any of these algoritmic questions. Never did that stuff in my studies. Was this for a Senior developer job?

Don't be too worried. Most companies will accept that out of graduation you actually know nothing about commercial coding (which is a very different beast). It'll be much more important to show that you are keen to learn, are probably not an axe murderer and that sort of stuff.

Even at a senior level, I'll always be asking "what projects have you actually done?" "What went wrong? What did you learn?" because if somebody has written a general ledger or got up a 24x7 MES system or whatever then I'll know they can either write a binary search or be able to search google to copy paste some code if they need it.
 

TronLight

Everybody is Mikkelsexual
Can I ask a question about some very very basic Basic here? :lol
I'm still studying and I'm still in high school so it's very superficial, but it's a start. :D

I was given this exercise:
You have a list of names and ages, you want to know who can vote and who can't.
So here's what I did (sorry in advance if it's done in a stupid way or something important is missing)

Code:
Public Class Form1
    Dim Name, Answer As String
    Dim Age As Double
    Private Sub CmdEsegui_Click(sender As System.Object, e As System.EventArgs) Handles CmdEsegui.Click
        Do
            Age = 0
            Name = InputBox("Insert you name", "Name")
            Eta = Val(InputBox("Insert you age", "Age"))
            If (Age >= 18 And Age < 25) Then
                MsgBox("You can vote for... i referendum e alla camera dei deputati", 0, "Vote")
            ElseIf (Age > 25) Then
                MsgBox("You can vote for... i referendum, alla camera dei deputati e dei senatori", 0, "Vote")
            ElseIf (Age <= 17) Then
                MsgBox("You can't vote", 0, "Vote")
            End If
            Answer = InputBox("The list is over? Yes or No", "Answer")
            Answer = LCase(Answer)
        Loop Until (Answer = "yes")
    End Sub
End Class
(Sorry for some italian)

So basically, you give it you age and the it does "if >=..." and then it tells you if you can vote or no.
And it works. :lol
But if I wanted to do the same thing but with the age expressed as a date? Like 19/05/1990, then I'd do 2012-1990 = 22, so age = 22 and then the program goes on.
I looked up Microsoft's MDSN (I'm using Visual Studio) and I saw this Date command, that reads the current date from the system, but how do I use the date that it reads?
In particular, I'd have to substract just the current year from the one the user was born in, and then check if the day/month has already passed (because otherwise it would still be 21 in this case).
I such thing possible?
 
I such thing possible?

A good rules is whenever you have to deal with time, never do the calculations yourself. There is always a library or method call that you can use and it'll avoid having to deal with all sorts of special cases and timezones and whatever (to a point).

Not sure what version you are using, but look up DateDiff or similar and it might sort you out.
 

usea

Member
Can I ask a question about some very very basic Basic here? :lol
I'm still studying and I'm still in high school so it's very superficial, but it's a start. :D

I was given this exercise:
You have a list of names and ages, you want to know who can vote and who can't.
So here's what I did (sorry in advance if it's done in a stupid way or something important is missing)

Code:
Public Class Form1
    Dim Name, Answer As String
    Dim Age As Double
    Private Sub CmdEsegui_Click(sender As System.Object, e As System.EventArgs) Handles CmdEsegui.Click
        Do
            Age = 0
            Name = InputBox("Insert you name", "Name")
            Eta = Val(InputBox("Insert you age", "Age"))
            If (Age >= 18 And Age < 25) Then
                MsgBox("You can vote for... i referendum e alla camera dei deputati", 0, "Vote")
            ElseIf (Age > 25) Then
                MsgBox("You can vote for... i referendum, alla camera dei deputati e dei senatori", 0, "Vote")
            ElseIf (Age <= 17) Then
                MsgBox("You can't vote", 0, "Vote")
            End If
            Answer = InputBox("The list is over? Yes or No", "Answer")
            Answer = LCase(Answer)
        Loop Until (Answer = "yes")
    End Sub
End Class
(Sorry for some italian)

So basically, you give it you age and the it does "if >=..." and then it tells you if you can vote or no.
And it works. :lol
But if I wanted to do the same thing but with the age expressed as a date? Like 19/05/1990, then I'd do 2012-1990 = 22, so age = 22 and then the program goes on.
I looked up Microsoft's MDSN (I'm using Visual Studio) and I saw this Date command, that reads the current date from the system, but how do I use the date that it reads?
In particular, I'd have to substract just the current year from the one the user was born in, and then check if the day/month has already passed (because otherwise it would still be 21 in this case).
I such thing possible?
I don't know VB, but you can subtract dates. You get a TimeSpan, which represents a length of time. TimeSpans have a property called TotalDays which you can use to determine if it's more than the number of years you're checking for. You can also compare TimeSpans with >, <, >=, etc. And you can subtract them.

So one method would be to get the current time (DateTime.Now) and subtract from it their birthday, then compare the difference with a timespan that represents how old you have to be to vote.

Another way to do it would be to add a timespan representing how old you have to be to vote to their age, and see if that results in a date that is after today.

You can make timespans that represent lengths of time with the methods like TimeSpan.FromDays(int numDays).

Again, I don't know VB so this is probably of limited help to you. You might try checking out some of the pages on msdn, which often have VB examples at the bottom. e.g. http://msdn.microsoft.com/en-us/lib...aspx?cs-save-lang=1&cs-lang=vb#code-snippet-1
http://msdn.microsoft.com/en-us/library/system.timespan.aspx
 

usea

Member
Btw, what's the starting salary a programmer/software developer should expect just out of graduation?
I only know about the US. It varies a lot on the area (state, city etc) and the company. I've seen people accept as low as $30k, and as high as $100k for specialized skills they developed in school. It seems somewhere around 50k is reasonable, but you could easily get 65k in other places.

But don't just take my word for it. There are a bunch of websites for such things, and other people may have conflicting experience.
 
I only know about the US. It varies a lot on the area (state, city etc) and the company. I've seen people accept as low as $30k, and as high as $100k for specialized skills they developed in school. It seems somewhere around 50k is reasonable, but you could easily get 65k in other places.

But don't just take my word for it. There are a bunch of websites for such things, and other people may have conflicting experience.

It is quite different in Australia too.

I'd be expecting somewhere from $40-50k depending on the industry to start with but you will go up pretty quickly if you are producing the goods.

I'd expect 60-80k for intermediate with a senior getting somewhere up to around 90-120k.
 

TronLight

Everybody is Mikkelsexual
A good rules is whenever you have to deal with time, never do the calculations yourself. There is always a library or method call that you can use and it'll avoid having to deal with all sorts of special cases and timezones and whatever (to a point).

Not sure what version you are using, but look up DateDiff or similar and it might sort you out.

cut

Again, I don't know VB so this is probably of limited help to you. You might try checking out some of the pages on msdn, which often have VB examples at the bottom. e.g. http://msdn.microsoft.com/en-us/lib...aspx?cs-save-lang=1&cs-lang=vb#code-snippet-1
http://msdn.microsoft.com/en-us/library/system.timespan.aspx

Thanks to both!
It's too late here to try and do something, tomorrow I'll check it out though!

I only know about the US. It varies a lot on the area (state, city etc) and the company. I've seen people accept as low as $30k, and as high as $100k for specialized skills they developed in school. It seems somewhere around 50k is reasonable, but you could easily get 65k in other places.

But don't just take my word for it. There are a bunch of websites for such things, and other people may have conflicting experience.

It is quite different in Australia too.

I'd be expecting somewhere from $40-50k depending on the industry to start with but you will go up pretty quickly if you are producing the goods.

I'd expect 60-80k for intermediate with a senior getting somewhere up to around 90-120k.

I said goddamn.
I guess that you'd be lucky to get something like 20k&#8364; before taxes here. If you ever find a job. :lol
I'll have to look for a job out of Italy after university...
 
It is quite different in Australia too.

I'd be expecting somewhere from $40-50k depending on the industry to start with but you will go up pretty quickly if you are producing the goods.

I'd expect 60-80k for intermediate with a senior getting somewhere up to around 90-120k.

holy shit. Is the IT industry big in Australia?
 
holy shit. Is the IT industry big in Australia?

Relatively? No. But I guess it is big enough given the population. For example Seek (Aus job site) has just over 1000 developer jobs in Sydney open at the moment.

http://www.seek.com.au/JobSearch?Da...=&location=1000&industry=6281&occupation=6287

The main problem is you will need to be in a big city like Sydney to get regular work or opportunities (unless you are quite lucky/good). Living in such places is generally pretty expensive or a big pain in terms of commuting.

Already have eclipse, but I guess I could try doing random projects.

My favourite learning project is still Pacman. You should be reading in a level from a file, have multiple threads for each ghost/player, lots of collections and a little bit of graphics stuff too.
 
This makes me fear future interviews. I recently graduated and I was looking into software development as well (though not JS and Obj. C), but I couldn't solve any of these algoritmic questions. Never did that stuff in my studies. Was this for a Senior developer job?
I'm a few years out of school, so I'm interviewing for a higher position than you would be. I'm not sure where you're looking to work, but where I currently work has an almost identical interview process to the one I described above. Virtually all of the tech giants do something extremely similar, even for kids right out of school. As others have mentioned, we don't expect you to come in and code like a pro. In a real environment, you'll obviously have other resources to aid your process, but an IDE and a search engine are not going to teach you to think critically about difficult problems. That is, by and large, why those algorithm questions are used - they're designed to take some time to solve properly and they demonstrate a number of important skills: knowledge of the language you're coding in and the data structures you're working with, the ability to communicate effectively about a problem and carefully analyze the good and bad aspects of potential solutions, etc.

I would expect that as you reach higher levels, projects you've already worked on are discussed more and more. To that end, I can't emphasize enough how important it is to be able to point to projects you've undertaken outside of the confines of work and class (i.e. something you did for fun on your own time). Even with projects to point to, if you're unable to do some problem solving, that's probably going to raise red flags. One person I was part of the interview process for (who was 10 years my senior and much more experienced) didn't exactly dazzle us in his interview; he was given a chance to redeem himself with a follow-up programming problem (with a few days to complete it and send it back). For UI guys, we also have an assessment (an adaptation of Rebecca Murphey's js-assessment). Well-written code produces measurable results. It should follow that an interview for a coding job would be much less nebulous and much more measurable than one for someone looking to join a marketing department. At the end of the day, I think that is a good thing.

If you're looking to learn about the critical data structures and algorithms, I'd recommend Skiena's Algorithm Design Manual (PDF). That is the book the company I just visited recommended I review.

Another book I found very helpful in terms of going in knowing what to expect was Cracking the Coding Interview, which has a ton of example questions and answers.

To prep for this interview, I studied Skiena first, did practice problems on my whiteboard at home (nerd alert) from Cracking the Coding Interview and re-read the best book I own on JavaScript (Crockford's JavaScript: The Good Parts) and Objective C (not actually a book - I used the Stanford CS193p videos on iTunes U). At the end of the day, none of those things are going to make you a worse programmer.
 

nan0

Member
I'm a few years out of school, so I'm interviewing for a higher position than you would be. I'm not sure where you're looking to work, but where I currently work has an almost identical interview process to the one I described above. Virtually all of the tech giants do something extremely similar, even for kids right out of school. As others have mentioned, we don't expect you to come in and code like a pro. In a real environment, you'll obviously have other resources to aid your process, but an IDE and a search engine are not going to teach you to think critically about difficult problems. That is, by and large, why those algorithm questions are used - they're designed to take some time to solve properly and they demonstrate a number of important skills: knowledge of the language you're coding in and the data structures you're working with, the ability to communicate effectively about a problem and carefully analyze the good and bad aspects of potential solutions, etc.

I would expect that as you reach higher levels, projects you've already worked on are discussed more and more. To that end, I can't emphasize enough how important it is to be able to point to projects you've undertaken outside of the confines of work and class (i.e. something you did for fun on your own time). Even with projects to point to, if you're unable to do some problem solving, that's probably going to raise red flags. One person I was part of the interview process for (who was 10 years my senior and much more experienced) didn't exactly dazzle us in his interview; he was given a chance to redeem himself with a follow-up programming problem (with a few days to complete it and send it back). For UI guys, we also have an assessment (an adaptation of Rebecca Murphey's js-assessment). Well-written code produces measurable results. It should follow that an interview for a coding job would be much less nebulous and much more measurable than one for someone looking to join a marketing department. At the end of the day, I think that is a good thing.

If you're looking to learn about the critical data structures and algorithms, I'd recommend Skiena's Algorithm Design Manual (PDF). That is the book the company I just visited recommended I review.

Another book I found very helpful in terms of going in knowing what to expect was Cracking the Coding Interview, which has a ton of example questions and answers.

To prep for this interview, I studied Skiena first, did practice problems on my whiteboard at home (nerd alert) from Cracking the Coding Interview and re-read the best book I own on JavaScript (Crockford's JavaScript: The Good Parts) and Objective C (not actually a book - I used the Stanford CS193p videos on iTunes U). At the end of the day, none of those things are going to make you a worse programmer.

Much appreciated! Guess I have to brush up my theoretical CS skills. We had a course for basic stuff like search algorithms, simple data structures, state machines and grammars. So I know what the questions are about, but solving them would take me far more time and external resources as I had in an interview .
 

Bboy AJ

My dog was murdered by a 3.5mm audio port and I will not rest until the standard is dead
I decided to try my hand at programming. I know nothing about it. I have some time to learn something new so I figured why not.

I picked up Aaron Hillegass's Big Nerd Ranch Guide for Objective-C programming. Looking forward to this journey.
 

pompidu

Member
There is no numRecords field in your sample input. So why are you reading in one?

This was purely following his examples so im not sure if that is even right. so how do you count the records in the file for the "for" loop?
Edit: oK i see what your saying. SO how would I know when to kill the for loop?
 

Lathentar

Looking for Pants
This was purely following his examples so im not sure if that is even right. so how do you count the records in the file for the "for" loop?

You read until the end of the file is reached. You can do this with the scanner class by calling: hasNextLine()
 

Bboy AJ

My dog was murdered by a 3.5mm audio port and I will not rest until the standard is dead
Awesome to hear. Make sure you ask any questions as you go in here.

Thanks! I'm not in this field and so I don't know anyone with whom I can talk to about this stuff. It'll be really great to have a community where I can ask questions and help me continue to satisfy my curiosity.
 

pompidu

Member
You read until the end of the file is reached. You can do this with the scanner class by calling: hasNextLine()

Would this be correct for a loop? Or will it not read the last line?
Code:
while (houseList.hasNextLine())
		{
			a = houseList.next();
			p = houseList.nextDouble();
			ar = houseList.nextDouble();
			r = houseList.nextInt();
			HouseList.add(a, p, ar, r);
		}
 
Top Bottom