• 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

Well, since I went with the "try and figure this out" method, I went with scanlines - prior to the tri method, I wrote the one for lines (much simpler... :p).

Split the triangle into 2, then draw between highest and mid y, then mid to low y. It's real slow right now, so I think I'll have to fix a few things here and there. I'm not concerned with subpixel things right now, just figuring things. I actually didn't think about doing fixed point - the current method I have uses float, which probably is a factor in the slowness because I had to make a few macros for float comparison. But I'm rewriting it now, so that's that.

Oh, and I'm currently using SDL as the graphics presenter (it probably uses DX on the back or Windows though).

edit: Ah, found out what was making things so slow - unneeded call to a method. Things seem speedy - let's see if I can emulate triangle strips and whatnot...

I have it working with triangle List. Seemed like the easiest way to parse a OBJ file to get the faces data in.
Triangle strip is when you take the last two vertices of the previous triangle right?
 
I have it working with triangle List. Seemed like the easiest way to parse a OBJ file to get the faces data in.
Triangle strip is when you take the last two vertices of the previous triangle right?
Yeah, just take every 3 while moving through the list one vertex at a time. I think next up...

Translation/Scale/Rotation
Projection
3D

Oh, and color as well. But a bit later though, as I've just woken.
 

usea

Member
While we're on the subject of JS/web stuff, what book would you guys recommend to learn just that? I know the very basics of HTML and CSS, but I'm very inexperienced with web in general. This book (Learning Web Design: A Beginner's Guide to HTML, CSS, JavaScript, and Web Graphics) has good reviews and seems fitting for what I'm looking to learn. Any other recommendations?
I don't have any recommendations, but that book seems to be about web design (the visual side of it), in html and css. It won't really cover programming web applications.
 

APF

Member
While we're on the subject of JS/web stuff, what book would you guys recommend to learn just that? I know the very basics of HTML and CSS, but I'm very inexperienced with web in general. This book (Learning Web Design: A Beginner's Guide to HTML, CSS, JavaScript, and Web Graphics) has good reviews and seems fitting for what I'm looking to learn. Any other recommendations?

For JS:

Javascript the Definitive Guide
http://www.amazon.com/dp/0596805527/?tag=neogaf0e-20

Javascript the Good Parts
http://www.amazon.com/dp/0596517742/?tag=neogaf0e-20
 
I was poking through a util.js file of a fauxbile application I wrote a few months ago, and realized that there's only one comment throughout the entire file that isn't me ranting about CSS, Javascript, or iOS/Android browser idiosyncrasies.
 

APF

Member
The major pain points of frontend web development are: DOM / interface inconsistencies > CSS inconsistencies > CSS being a poor language to describe layout. So much time is spent handling or working around those issues that it's ridiculously difficult (for the level of results) to create even simple web apps. Of course, this is why good frontend devs are in high demand (and some would argue overpaid :) )
 
I am about to graduate with a BS in Geographic Information Systems, and it is looking like many of the jobs out there require at least some programming experience. Some say JavaScript, other C++, but most ask for Python.

What is the best way to learn Python? I've started taking the courses at CodeAcademy, but I'm not sure if this is the best way. It appears that Learn Python The Easy Way is another popular option, but I started reading it and one of the first things it says to do is to run the Terminal program, which I have no idea what it is.

Any suggestions are welcome :)
 
I need to get back into C++ again. I loved it back in highschool but I havent touched it in years. Can anyone recommend any practical ways to get back into it. What IDE is the industry working with these days? I only have MS Visual Studios 2012 Pro at the moment.

I am about to graduate with a BS in Geographic Information Systems, and it is looking like many of the jobs out there require at least some programming experience. Some say JavaScript, other C++, but most ask for Python.

What is the best way to learn Python? I've started taking the courses at CodeAcademy, but I'm not sure if this is the best way. It appears that Learn Python The Easy Way is another popular option, but I started reading it and one of the first things it says to do is to run the Terminal program, which I have no idea what it is.

Any suggestions are welcome :)

I'd like to know more info as well. Maybe for Ruby as well
 

Seance

Banned
Question for eclipse users:

I am unable to run a different class in my java project. There is no option to run as java application like there is with my other class.
How can I get it to run?
 

iapetus

Scary Euro Man
Question for eclipse users:

I am unable to run a different class in my java project. There is no option to run as java application like there is with my other class.
How can I get it to run?

It needs a valid main method. Must be public static void main (String[] args).
 

Tamanon

Banned
I am about to graduate with a BS in Geographic Information Systems, and it is looking like many of the jobs out there require at least some programming experience. Some say JavaScript, other C++, but most ask for Python.

What is the best way to learn Python? I've started taking the courses at CodeAcademy, but I'm not sure if this is the best way. It appears that Learn Python The Easy Way is another popular option, but I started reading it and one of the first things it says to do is to run the Terminal program, which I have no idea what it is.

Any suggestions are welcome :)

Your terminal program is just your command prompt.

Or, if you download Python 2, just run IDLE(installed with Python). It's a Python text editor and console.

I'm mixing CodeAcademy on the side, and I've got a textbook with programming basics and a Python supplement.
 

Slavik81

Member
Well, I'm spending a friday night compiling gcc from source, sipping my beer and listening to music. Not sure if this is sad or awesome, but I'm leaning towards awesome.

I need to get back into C++ again. I loved it back in highschool but I havent touched it in years. Can anyone recommend any practical ways to get back into it. What IDE is the industry working with these days? I only have MS Visual Studios 2012 Pro at the moment.
VS2012 is a good editor. You should have all the tools you need. All you need is practice.
 

Seance

Banned
It needs a valid main method. Must be public static void main (String[] args).

Yeah, it wasn't static. Thanks. :D

Having trouble with a new program. Need to manipulate a string so that the first letter is swapped with a random other letter from said string.

Got this atm:

Code:
import java.util.Random;

public class StringManipulation2_7


{
		
	public static void main (String[] args)
	{	
		String firstName = "Sean";
		int length = firstName.length();
		Random generator = new Random();
		int beginIndex = generator.nextInt(length);
		int numChar = generator.nextInt(length - beginIndex)+1;		
		int endIndex = beginIndex + numChar;
		System.out.println("New string is: " + firstName.substring(beginIndex, endIndex) + "\n" + "Old string was: " + firstName);
				
	}
}
 

nan0

Member
Yeah, it wasn't static. Thanks. :D

Having trouble with a new program. Need to manipulate a string so that the first letter is swapped with a random other letter from said string.

Got this atm:

I would convert the string into a char[] array (firstName.toCharArray()), then you can easily swap the two letters with your randomly generated indices.
 
Yesterday was funny, as I had spare time on my project a co-worked complained about renaming certain files that was a chore. Coded a (rather specific) renaming program in like 30 minutes, failsafes and UI's et all. Problem solved.jpg
 
Hi guys,

I'm currently learning C++ and am in the section on pointers. I have the following code that is giving me these errors: error LNK2019: unresolved external symbol, on my void initialize function in main() and one in isEmpty() function in display()

Any idea what I am missing here? Can't figure out what I did wrong. Sorry for the long post.

The error:
1>Pointers_Inventory.obj : error LNK2019: unresolved external symbol "void __cdecl initialize(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const * const * const,int)" (?initialize@@YAXQBQBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@H@Z) referenced in function _main
1>Pointers_Inventory.obj : error LNK2019: unresolved external symbol "bool __cdecl isEmpty(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const * const * const,int)" (?isEmpty@@YA_NQBQBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@H@Z) referenced in function "void __cdecl display(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const * const * const,int)" (?display@@YAXQBQBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@H@Z)
1>C:\Users\Matthew\Desktop\CS133U C++\Pointers_Inventory\Debug\Humphreys_Matthew_Pointers_Inventory.exe : fatal error LNK1120: 2 unresolved externals
========== Rebuild All: 0 succeeded, 1 failed, 0 skipped ==========

Code:
//Inventory
//Manages a player's inventory

#include <iostream>
#include <string>

using namespace std;

//Initializes a container
void initialize(const string* const container[], int capacity);

//Tests filled status of a container
bool isFull(const string* const container[], int capacity);

//Tests empty status of a container
bool isEmpty(const string* const container[], int capacity);

//Tests if an item is in a container
bool contains(const string* const pItem, const string* container[], int capacity);

//Displays the item in a container
void display(const string* const container[], int capacity);

//Adds an item to a container
void add(const string* const pItem, const string* container[], int capacity);

//Removes an item from a container
void remove(const string* const pItem, const string* container[], int capacity);

int main()
{
	cout << "\tWelcome to Inventory!" << endl;

	//Items
	const int NUM_ITEMS = 5;
	const string items[NUM_ITEMS] = {"sword", "axe", "shield", "gold", "potion"};

	//Inventory
	const int INVENTORY_CAPACITY = 3;
	const string* inventory[INVENTORY_CAPACITY];
	initialize(inventory, INVENTORY_CAPACITY);

	int choice;			//Menu Choice
	int itemNumber;		//Number of item to add or remove

	do
	{
		cout << endl << "Inventory" << endl;
		cout << "---------" << endl << endl;
		cout << "0 - Quit" << endl;
		cout << "1 - Display items in the inventory" << endl;
		cout << "2 - Add an item to the inventory" << endl;
		cout << "3 - Remove an item from the inventory" << endl;
		cout << endl << endl << "Choice: ";
		cin >> choice;
		cout << endl;

	switch(choice)
		{
			case 0:
				cout << "Goodbye." << endl;
				break;
			case 1:
				cout << "Inventory:" << endl;
				display(inventory, INVENTORY_CAPACITY);
				break;
			case 2:
				for (int i = 0; i < NUM_ITEMS; i++)
				{
					cout << i << " - " << items[i] << endl;
				}
				do
				{
					cout << "Enter the number of the item to add: ";
					cin >> itemNumber;
				} while(itemNumber < 0 || itemNumber >= NUM_ITEMS);

				//Pass address of element items[itemNumber]
				add(&items[itemNumber], inventory, INVENTORY_CAPACITY);
				break;
			case 3:
				for (int i = 0; i < NUM_ITEMS; i++)
				{
					cout << i << " - " << items[i] << endl;
				}
				do
				{
					cout << "Enter the number of the item to remove: ";
					cin >> itemNumber;
				} while(itemNumber < 0 || itemNumber >= NUM_ITEMS);

				//Pass address of element items[itemNumber]
				remove(&items[itemNumber], inventory, INVENTORY_CAPACITY);
				break;
			default:
				cout << "Sorry, " << choice << " isn't a valid choice." << endl;
			}
		} while(choice !=0);
	
	return 0;
}

//Initialize Function
void initialize(const string* container[], int capacity)
{
	//Set all elements to NULL
	for (int i = 0; i < capacity; i++)
	{
		container[i] = NULL;
	}
}

//isFull Function
bool isFull(const string* container[], int capacity)
{
	bool full = true;
	int i = 0;

	while (full && i < capacity)
	{
		//If there's at least one empty slot...
		if(container[i] == NULL)
		{
			//Then the container isn't full
			full = false;
		}
	++i;
	}
	return full;
}

//isEmpty Function
bool isEmpty(const string* container[], int capacity)
{
	bool empty = true;
	int i = 0;

	while(empty && i < capacity)
	{
		//If a slot isn't empty
		if(container[i] != NULL)
		{
		//Then the container isn't empty
		empty = false;
		}
	++i;
	}
	return empty;
}

//Containers Function
bool contains(const string* const pItem, const string* container[], int capacity)
{
	bool has = false;
	int i = 0;
	
	while(!has && i < capacity)
	{
		if(container[i] == pItem)
		{
			has = true;
		}
	i++;
	}
	return has;
}

//Display Function
void display(const string* const container[], int capacity)
{
	//If container is empty, display message saying so and return
	if (isEmpty(container, capacity))
	{
		cout << "<Empty>" << endl;
		return;
	}

	//Otherwise, send all strings pointed to by elements of container to cout
	for (int i = 0; i < capacity; ++i)
	{
		if(container[i] != NULL)
		{
			cout << *(container[i]) << endl;
		}
	}
}

//Add Function
void add(const string* const pItem, const string* container[], int capacity)
{
	if (pItem == NULL)
	{
		return;
	}

	if(contains(pItem, container, capacity))
	{
		cout << "Item already present. Can't add." << endl;
		return;
	}

	if (isFull(container, capacity))
	{
		cout << "Container full. Cant add." << endl;
		return;
	}

	//Find first null pointer in container, point it to string pItem points to
	bool found = false;
	int i = 0;

	while (!found && i < capacity)
	{
		if(container[i] == NULL)
		{
			container[i] = pItem; //Add pointer
			found = true;
		}
	i++;
	}
}

//Remove Function
void remove(const string* const pItem, const string* container[], int capacity)
{
	if(pItem == NULL)
	{
		return;
	}

	//Set element that is equal to pItem to NULL
	bool found = false;
	int i = 0;

	while (!found && i < capacity)
	{
		if(container[i] == pItem)
		{
		container[i] = NULL; //Remove pointer
		found = true;
		}
	++i;
	}

	//If item wasn't found, say so
	if(!found)
	{
		cout << "Item not found. Can't remove." << endl;
	}
}
 
Hi guys,

I'm currently learning C++ and am in the section on pointers. I have the following code that is giving me these errors: error LNK2019: unresolved external symbol, on my void initialize function in main() and one in isEmpty() function in display()

Any idea what I am missing here? Can't figure out what I did wrong. Sorry for the long post.
Your forward declarations must match signature with their later definitions. Note:

void initialize(const string* const container[], int capacity);
void initialize(const string* container[], int capacity)

are different, for example. Remember to only keep const what you're definitely not changing, and try it again.

Note: there may be other problems, but I only took note of this :)
 

nan0

Member
ColtraineGF is right, it compiles if you correct the signatures. Was that a copy/paste error? I have never seen const type const varname before.
 
ColtraineGF is right, it compiles if you correct the signatures. Was that a copy/paste error? I have never seen const type const varname before.

Nope. That was GLORIOUS USER ERROR. I just didn't notice I had those differences. Once I went in and removed the const from the initialize function proper and added a const to the isEmpty function, the program compiled properly.

Thank you for the help. I was pounding my head against this for awhile now and wasn't seeing the forest for the trees.
 

flowsnake

Member
ColtraineGF is right, it compiles if you correct the signatures. Was that a copy/paste error? I have never seen const type const varname before.

const pointer to const means you can't modify either the pointer or what is pointed to, if I remember correctly. I can never remember which way around it goes though.
 

d[-_-]b

Banned
Any suggestions on a private svn (no clue on GIT, used to cvs years ago and moved to svn), just need to host my project since moving it my developing on to my new laptop and tired of having 10 copies of the same project ;).
 

Haly

One day I realized that sadness is just another word for not enough coffee.
I don't know about private SVN servers, but there is a TortoiseGit, which bypasses all the shell stuff and behaves more or less like TortoiseSVN.
 

nan0

Member
d[-_-]b;62150779 said:
Any suggestions on a private svn (no clue on GIT, used to cvs years ago and moved to svn), just need to host my project since moving it my developing on to my new laptop and tired of having 10 copies of the same project ;).

I have a free private SVN repo at Assembla, never had issues.

const pointer to const means you can't modify either the pointer or what is pointed to, if I remember correctly. I can never remember which way around it goes though.

Ah, that makes sense. Haven't used C++ since my university courses.
 

Magni

Member
Anybody here ever use Tomcat? I'm trying to install Apache Roller for a class, running it on Tomcat. The problem is that Tomcat won't work, I get 502s despite the server launching with no errors. I've checked and the ports are free.

I've been racking my brain all weekend without success. Google/StackOverflow have been unable to help. Any pointers would be greatly appreciated.
 
About a week ago, I've started the Udacity programming beginners course as well as learning Python the hard way, this is a very serious venture for myself. I was hoping to apply what I learned professionally, figured I give the self taught route a try. I've now reached a point where I feel like what I'm being taught isn't sticking and I haven't exactly made it very far in either Udacity (I'm stuck on how to use the find operation in lesson 1) and just completely clueless 90% of the time when it comes to learn * the hard way. I'm aware it's natural to be a bit overwhelmed so early on...? but is it possible that programming just isn't for me?

I'm not looking for an answer, just a little guidance. I really want to learn programming but I feel that maybe I might not have the "mind" for it, and let's be honest, programming isn't for everyone.

P.S. - I'm also giving code academy a shot, which seems a lot easier and tends to hold your hand a bit more.
 

usea

Member
About a week ago, I've started the Udacity programming beginners course as well as learning Python the hard way, this is a very serious venture for myself. I was hoping to apply what I learned professionally, figured I give the self taught route a try. I've now reached a point where I feel like what I'm being taught isn't sticking and I haven't exactly made it very far in either Udacity (I'm stuck on how to use the find operation in lesson 1) and just completely clueless 90% of the time when it comes to learn * the hard way. I'm aware it's natural to be a bit overwhelmed so early on...? but is it possible that programming just isn't for me?

I'm not looking for an answer, just a little guidance. I really want to learn programming but I feel that maybe I might not have the "mind" for it, let's be honest, programming isn't for everyone.

P.S. - I'm also giving code academy a shot, which seems a lot easier and tends to hold your hand a bit more.
It's true programming isn't for everyone. But it doesn't sound like that would be a fair conclusion to make in your position. It sounds more like the way you're learning it isn't sticking immediately and you want to jump ship instead of pressing on.

You just don't have the data at this point to determine whether programming is for you. Learn it first, and do it for a year or two, and then you'll know. I realize that's a tall order and kind of unfair, but I'm just being honest.

If I had to describe what qualities were helpful or somewhat essential in being a programmer, I'd say they included:
attention to detail
patience
the ability to create, examine and modify a mental model from a system of rules or processes
a sense of logic
not bothered by sitting in front of a computer, typing for long periods

The kinds of people I've seen who were just ill-suited for programming had the following qualities:
carelessness
frequently believes they fully understand the depth / nuance of a topic they've really only scratched the surface of
easily frustrated when encountering problems or obstacles
annoyed when having to learn a new thing

However, all kinds of drastically different people are successful programmers; I am just extrapolating from my own experience. Take it with a grain of salt. If you want to learn to program, don't let anything stop you, especially not self-doubt.
 
However, all kinds of drastically different people are successful programmers; I am just extrapolating from my own experience. Take it with a grain of salt. If you want to learn to program, don't let anything stop you, especially not self-doubt.

Thanks, I needed that. And you're right, I'm barely out of the gate and I've already thrown in the towel. Plan on giving this 110% from here on out. I've listed the qualities you mentioned as reference to help give me a much more confident perspective.
 
About a week ago, I've started the Udacity programming beginners course as well as learning Python the hard way, this is a very serious venture for myself. I was hoping to apply what I learned professionally, figured I give the self taught route a try. I've now reached a point where I feel like what I'm being taught isn't sticking and I haven't exactly made it very far in either Udacity (I'm stuck on how to use the find operation in lesson 1) and just completely clueless 90% of the time when it comes to learn * the hard way. I'm aware it's natural to be a bit overwhelmed so early on...? but is it possible that programming just isn't for me?

I'm not looking for an answer, just a little guidance. I really want to learn programming but I feel that maybe I might not have the "mind" for it, and let's be honest, programming isn't for everyone.

P.S. - I'm also giving code academy a shot, which seems a lot easier and tends to hold your hand a bit more.

Isn't there a defacto book for teaching python?
I find learning the basics from a book a lot better then watching movies on youtube or something. And it takes time just try to stick with python for like 4 month or 1 year and master the basics.
 
Does anyone know a good guide to install Drupal in Linux Mint?

I wonder if anyone know something similar to Drupal and good software testing material to get up to date.
 
https://developer.nvidia.com/conten...erating-complex-procedural-terrains-using-gpu

I think I found my programming project for this summer. TL;DR for the article is: Generating a procedurally generated world solely on the GPU with a density function + marching cubes algorithm approach. Includes texturing as well. Looks challenging but super awesome. I haven't done any real shader stuff yet (apart from filling in code into an already existing shader for some assignments last semester) but this looks fascinating. I love procedurally generated stuff. There seems to be an existing implementation of the shader in HLSL and there also seems to be a partial implementation of the CPU side (I haven't looked at it yet) here: http://www.geisswerks.com/about_terrain.html
 
https://developer.nvidia.com/conten...erating-complex-procedural-terrains-using-gpu

I think I found my programming project for this summer. TL;DR for the article is: Generating a procedurally generated world solely on the GPU with a density function + marching cubes algorithm approach. Includes texturing as well. Looks challenging but super awesome. I haven't done any real shader stuff yet (apart from filling in code into an already existing shader for some assignments last semester) but this looks fascinating. I love procedurally generated stuff. There seems to be an existing implementation of the shader in HLSL and there also seems to be a partial implementation of the CPU side (I haven't looked at it yet) here: http://www.geisswerks.com/about_terrain.html

Looks like a cool project for the summer.
I think i will dive into dx 11 this summer and go for deferred renderer project and then maybe i can get the green light to do some Human animation project and do research on existing techniques. Or get a green light too make a spaceship combat game something like Halo reach space section. Seems like fun.

The summer project should at least shave off a extra 3~4 weeks on start up time making some visual representation of the project.

Hope that sony and microsoft both give access to hardware natively with something like what XNA did on 360(managed).
 
Saw an interesting thing regarding framebuffers (I think) yesterday.

Loading UI-text to the program from CSV and pausing the progress with an Alert makes the UI-text appear about 3-4 seconds after the loading is complete (when Flash Player calls invalidateDisplayList()-method I think).

(Picture taken with a camera)

tQfMH3K.jpg


But printscreen screenshot (that is taken from Windows framebuffer right?) already shows the texts:

(Print Screen taken same time as the picture above)
IJ0Z7BP.png
 

Tamanon

Banned
Hey guys,

My learning of Python is going along decently thus far. I'm doing a lot more of the work in my class than is required. We're not going to get into the GUI stuff ourselves, but I want to incorporate one into some of the simple programs I'm learning. My ultimate goal is going to be building a test generator for my CCNA test later this year, so I'm learning about drawing from files and such.

Does anyone know a good resource for GUI design for Python2?
 
Hey guys,

My learning of Python is going along decently thus far. I'm doing a lot more of the work in my class than is required. We're not going to get into the GUI stuff ourselves, but I want to incorporate one into some of the simple programs I'm learning. My ultimate goal is going to be building a test generator for my CCNA test later this year, so I'm learning about drawing from files and such.

Does anyone know a good resource for GUI design for Python2?

I guess you need to decide wich gui toolkit you want to use and find the python bindings for it. I heard PyQt used to work fine.
 
OK I got a small job making an iOS app. I've never made an iOS app before but I have made Android apps of a similar type so I assumed it would be easy and now I'm stuck. Google's API documents and sample code make it so easy to understand how to use the features. I can't find an equivalent for iOS. I thought more people made iOS apps I never knew this would be such a pain. Any help ????
 
OK I got a small job making an iOS app. I've never made an iOS app before but I have made Android apps of a similar type so I assumed it would be easy and now I'm stuck. Google's API documents and sample code make it so easy to understand how to use the features. I can't find an equivalent for iOS. I thought more people made iOS apps I never knew this would be such a pain. Any help ????

https://developer.apple.com/library/ios/navigation/index.html

?
 

Nitsuj23

Member
Hey all. I'm practicing Java pretty aggressively. IBM is doing somewhat of a mass hiring of entry level Java developers. The requirements don't seem completely out of reach, but I just graduated with an Accounting degree so it's not something I'm super familiar with. I only did one semester of Pyton before I graduated - enough time to know I wanted to pursue software development, but graduated right after that so I'm really trying to make up for lost time. I want to get an interview in sooner than later!

I've been doing the Udacity course and reading through Oracle's Java documentation. Today I was reading through Cracking the Coding Interview OOP section and one question has you program a Blackjack game. They have an "executable" version on their Github, only problem is I can't seem to figure out how to execute it. I've downloaded the files from here (https://github.com/gaylemcd/ctci/tree/master/java/Chapter 8/Question8_1) and dragged them into my Package Explorer in Eclipse. I assume I'm supposed to run the Question.java file because it has the main method(method, right?), but I just keep getting errors no matter what I try.

I'd really appreciate if anyone could try getting the linked Blackjack game to run... it's driving me crazy! Thanks in advance!

Here's the link again - https://github.com/gaylemcd/ctci/tree/master/java/Chapter 8/Question8_1
 
Hey all. I'm practicing Java pretty aggressively. IBM is doing somewhat of a mass hiring of entry level Java developers. The requirements don't seem completely out of reach, but I just graduated with an Accounting degree so it's not something I'm super familiar with. I only did one semester of Pyton before I graduated - enough time to know I wanted to pursue software development, but graduated right after that so I'm really trying to make up for lost time. I want to get an interview in sooner than later!

I've been doing the Udacity course and reading through Oracle's Java documentation. Today I was reading through Cracking the Coding Interview OOP section and one question has you program a Blackjack game. They have an "executable" version on their Github, only problem is I can't seem to figure out how to execute it. I've downloaded the files from here (https://github.com/gaylemcd/ctci/tree/master/java/Chapter 8/Question8_1) and dragged them into my Package Explorer in Eclipse. I assume I'm supposed to run the Question.java file because it has the main method(method, right?), but I just keep getting errors no matter what I try.

I'd really appreciate if anyone could try getting the linked Blackjack game to run... it's driving me crazy! Thanks in advance!

Here's the link again - https://github.com/gaylemcd/ctci/tree/master/java/Chapter 8/Question8_1

Didn't IBM just fired a lot of their workforce?
 

Jokab

Member
Hey all. I'm practicing Java pretty aggressively. IBM is doing somewhat of a mass hiring of entry level Java developers. The requirements don't seem completely out of reach, but I just graduated with an Accounting degree so it's not something I'm super familiar with. I only did one semester of Pyton before I graduated - enough time to know I wanted to pursue software development, but graduated right after that so I'm really trying to make up for lost time. I want to get an interview in sooner than later!

I've been doing the Udacity course and reading through Oracle's Java documentation. Today I was reading through Cracking the Coding Interview OOP section and one question has you program a Blackjack game. They have an "executable" version on their Github, only problem is I can't seem to figure out how to execute it. I've downloaded the files from here (https://github.com/gaylemcd/ctci/tree/master/java/Chapter 8/Question8_1) and dragged them into my Package Explorer in Eclipse. I assume I'm supposed to run the Question.java file because it has the main method(method, right?), but I just keep getting errors no matter what I try.

I'd really appreciate if anyone could try getting the linked Blackjack game to run... it's driving me crazy! Thanks in advance!

Here's the link again - https://github.com/gaylemcd/ctci/tree/master/java/Chapter 8/Question8_1
No errors here. Did you clone the repo into a separate folder and then create a new eclipse project inside the folder? I'm pretty sure that's the most common practice.

That is:
  • Go to your workspace folder, create a new folder there
  • Navigate to that folder using git
  • git clone https://github.com/gaylemcd/ctci.git
  • Create a new project in eclipse in the folder that was cloned, should be called ctci
  • Then you're done. Eclipse should recognize that there already is a project in that folder and import all the files.

The reason you're getting errors is probably because you're missing some of their dependencies, which you'll get if you clone the repo properly.
 
Looks like a cool project for the summer.
I think i will dive into dx 11 this summer and go for deferred renderer project and then maybe i can get the green light to do some Human animation project and do research on existing techniques. Or get a green light too make a spaceship combat game something like Halo reach space section. Seems like fun.

The summer project should at least shave off a extra 3~4 weeks on start up time making some visual representation of the project.

Hope that sony and microsoft both give access to hardware natively with something like what XNA did on 360(managed).

So it turns out that programming such a big shader is hard. Who knew. I'm gonna go and implement Marching Cubes on the CPU first. I'm gonna do it in Scala with SFML, I really like that library and it seems like the Marching Cubes algorithm is very easy to express in a functional style (it's basically a map/reduce operation). Also, Scala is really nice in general.
 

Nitsuj23

Member
No errors here. Did you clone the repo into a separate folder and then create a new eclipse project inside the folder? I'm pretty sure that's the most common practice.

That is:
  • Go to your workspace folder, create a new folder there
  • Navigate to that folder using git
  • git clone https://github.com/gaylemcd/ctci.git
  • Create a new project in eclipse in the folder that was cloned, should be called ctci
  • Then you're done. Eclipse should recognize that there already is a project in that folder and import all the files.

The reason you're getting errors is probably because you're missing some of their dependencies, which you'll get if you clone the repo properly.
Thanks. So did running Question.java show a Blackjack game? I'm just confused what it's even supposed to look like.

Edit: Yeah, I'm completely lost. This is so frustrating... I can't even get the thing running let alone to a point where I can make changes.

I have the ctci folder. I open Eclipse. I create a new Project in the ctci folder. Then what? Do I drag the Question.java in the src? Do I drag the entire contents of the folder to the Package Explorer? What's the point of creating the Project in the ctci folder when none of that stuff shows up in my Package Explorer?

I really just need to get this running to put my mind at ease. Please help... someone haha.
 
Top Bottom