• 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

mvtn

Member
Dear ProgrammingGAF,

I've been feeling more and more restless with my current job. I've been looking for new ones, and I've been getting this urge to get back into coding. I would like to do it for a career, but I have no professional or even personal experience outside of academics. I have an Associate of Science degree in Computer Science which I got last summer, but I didn't actually write any code, just transferred credits and fulfilled requirements for the program. Many, many years ago I wrote programs in Pascal, C++, and Java.

I'm looking for a path to writing code as a job. I'm looking for the quickest path possible and I'm willing to do whatever it takes. There was a time where I was intimidated by my peers (and professors) in Computer Science courses because they lived and breathed the stuff. But I've since found in my professional endeavors that living and breathing stuff is what produces the most success. I sure as hell don't want to live and breath UPS anymore. I don't believe in destiny, but there's a desire inside me that's compelling me to try and be a programmer.

So many of the job opportunities I see are looking for so much professional experience. Does that mean I should be looking at internships to get my foot in the door?

What about developing my skills on my own time? Is there a good online resource to start again and grow? I've heard mention of free online courses, but I don't know what's good for what and I just feel lost and desperate.

Anyways, thanks in advance for any advice you can provide.

Warm Regards,

Richard Welsh, a.k.a. HiredN00bs

Rosetta Code is a really good source for everything programming.
 
Rosetta Code is a really good source for everything programming.
I jumped back a page or so and saw code academy mentioned so I started running through stuff there. I'll check it out. I'm hanging up my controllers and filling the gaps with stuff like this.
 

Haly

One day I realized that sadness is just another word for not enough coffee.
From doing some brief reading, Ruby uses a kind of weird pass-by-value system where every value is actually a reference. It makes my head hurt thinking about it but that's why gen_small(board) can mutate the board.

But:
Code:
def display_board(board):
	for row in board:
		board = ' '.join(row)     // This returns a string, so I imagine somehow the interpreter is creating a temporary string named board, doing replacement functions on it, and printing it out, before moving to a new row of the original board that's an array
		board = board.replace('0', '?')
		board = board.replace('1', '?') 
		print board
 
From doing some brief reading, Ruby uses a kind of weird pass-by-value system where every value is actually a reference. It makes my head hurt thinking about it but that's why gen_small(board) can mutate the board.

But:
Code:
def display_board(board):
	for row in board:
		board = ' '.join(row)     // This returns a string, so I imagine somehow the interpreter is creating a temporary string named board, doing replacement functions on it, and printing it out, before moving to a new row of the original board that's an array
		board = board.replace('0', '?')
		board = board.replace('1', '?') 
		print board

I'm actually using Python but the same thing is probably true. Thanks.
 

NotBacon

Member
I jumped back a page or so and saw code academy mentioned so I started running through stuff there. I'll check it out. I'm hanging up my controllers and filling the gaps with stuff like this.

Codecademy is decent for getting some syntax down. I would do that for a while and then take a look at Project Euler and Code Abbey for some practice.

Once you feel comfortable with your language(s), and the terminal of course, you should start thinking like a problem-solver. Think about personal problems (e.g. messy file library, automatic mail checking, etc.) and then solve them with your programming prowess. Maybe even check out some Open Source projects that might need help.

After a few projects are out of the way, I would then dive into the more theoretical side of CS with sites like Udemy, Coursera, and Udacity. Once you've had your fill of theory and math....... do more projects! (and put them on Github)
 
I can't think of any convenient way of getting randomized configurations of ships onto the board so the generation code is going to look like a mess anyway. What you're basically going to do is choose a starting point (check if it's empty), choose a direction (right or down), and then start filling in those spaces with the ship. If there's a conflict, scrap it (reset all those slots to 0) and try again.

If you want to do it so that conflicts are avoided deterministically:

for a given ship of size X:
..for each empty point:
....for directions (down vertical) and (right horizontal):
......check X-1 points in that direction. If all exist and are empty, add this point and direction to a map of (point, [set of directions]) (basically a multi-map).

then randomly retrieve a point from the set of map keys;
then randomly retrieve a direction from the set of values for that key;
then use that point and direction to generate a ship.

(down vertical) and (right horizontal) are just arbitrary, you could equally pick another two complementary.

With all these methods though, if the board is too small relative to ship size, you could run into situations where an initial placement of some ships blocks later ships from being placed at all.
 
If you want to do it so that conflicts are avoided deterministically:
(process the ships in descending order of size)

for a given ship of size X:
..for each empty point:
....for directions (down vertical) and (right horizontal):
......check X-1 points in that direction. If all exist and are empty, add this point and direction to a map of (point, [set of directions]) (basically a multi-map).

then randomly retrieve a point from the set of map keys;
then randomly retrieve a direction from the set of values for that key;
then use that point and direction to generate a ship.

(down vertical) and (right horizontal) are just arbitrary, you could equally pick another two complementary.

I don't think that all possible configurations will be chosen with equal probability by this algorithm. Because it relies on first choosing a starting point, and for each point, the number of configurations that contain that point are not going to be the same. So if you imagine a scenario where a certain point only existed in 1 possible configuration (obviously not true, but an extreme example) this configuration would be chosen vastly more often than any other configuration.

Instead, how about representing a single ship configuration like this:

Code:
			    1 BYTE
________________________________________________________________
|   0	|   1	|   2	|   3	|   4	|   5	|   6	|   7	|
|----------------------------------------------------------------
|	   X		|	   Y		|      DIR	|
|----------------------------------------------------------------

Then a single board configuration is just a 64-bit integer where the leftmost byte is the configuration of the largest ship, and the rightmost byte is the configuration of the smallest ship.

Now all you need to do is make a vector<uint64>, generate every possible configuration using a brute force approach, and choose a random number in [0, N) where is the number of configurations, and choose the configuration at index N.

This is guaranteed to make any configuration equally likely. It might be slow generating every possible combination, but you could do it once offline and save the results, then just load the configuration universe at startup. Although it might be a fun exercise to try to make this algorithm fast (for example using dynamic programming)
 
I don't think that all possible configurations will be chosen with equal probability by this algorithm. Because it relies on first choosing a starting point, and for each point, the number of configurations that contain that point are not going to be the same.

Right, that's why each configuration is mapped to a single point and only checked via that point ;) (That's why it only goes in one direction vertically and one direction horizontally, so that a given configuration is never duplicated from another starting point going in the reverse direction).
 

Husker86

Member
Don't know if it was just overlooked or nobody actually had anything to contribute, but I'm gonna try this again:


Yay selfquoting!

I know this is late and might not be exactly what you need, but have you looked into RecyclerView?

You could make a die layout xml, and use that as the item layout in your RecyclerViewAdapter (have to custom make, but there are lots of examples online). Do all the styling framework for an individual die in that layout. In the custom adapter, you can assign specific data to each object using an ArrayList or something like that. You can use a FrameLayout for your RecyclerView's layout manager and organize the columns and such using that.

Just the first thing that popped into my head, but I'm not sure exactly what you're trying to accomplish.
 
After some trial and error I finally got the extra credit codecademy battleship program working like I wanted to. 5x5 or 6x6 grid depending on user choice. A two-space sized ship and a three-space sized ship. Written in python.

https://github.com/Hazama/Codecademy/blob/master/battleshipextracredit.py

I'm looking for any general kind of feedback. Maybe I need to comment more, or less. Maybe some things aren't as obvious. Perhaps I did something very inefficiently. Maybe I need to put some stuff in functions, or maybe I made functions for things that didn't really need to be functions.

My midship generation works fine, but if I did the same method for 4 or 5 space sized ships the current generation method would be a doozy (for my novice self at least) to implement. Dunno if there is a better way to do it. Some people suggested some stuff here already, like cpp is king, but I didn't understand it too well.

I'll simply link the page containing the code, it is a really small ~150 line program but that might be too big to simply post on the forum with
Code:
 tags.
 
After some trial and error I finally got the extra credit codecademy battleship program working like I wanted to. 5x5 or 6x6 grid depending on user choice. A two-space sized ship and a three-space sized ship. Written in python.

https://github.com/Hazama/Codecademy/blob/master/battleshipextracredit.py

I'm looking for any general kind of feedback. Maybe I need to comment more, or less. Maybe some things aren't as obvious. Perhaps I did something very inefficiently. Maybe I need to put some stuff in functions, or maybe I made functions for things that didn't really need to be functions.

My midship generation works fine, but if I did the same method for 4 or 5 space sized ships the current generation method would be a doozy (for my novice self at least) to implement. Dunno if there is a better way to do it. Some people suggested some stuff here already, like cpp is king, but I didn't understand it too well.

I'll simply link the page containing the code, it is a really small ~150 line program but that might be too big to simply post on the forum with
Code:
 tags.[/QUOTE]

Haven't looked at the logic in much detail (mostly looked at the play_game function), but it looks good! Couple of small things: 
The is_valid funciton does not need to have an if/else in it. You can just do the following (whether you prefer it is another question, but I don't think it loses anything in clarity)
[code]
def is_valid:
    return (row >= 0 and row <= difficulty - 1) and (col >= 0 and col <= difficulty - 1)
In Python, docstring-style comments (the ones with three quotation marks) are ususally inside the funciton, the first line after the 'def' line, like this:
Code:
def is_valid:
    """Ensures player inputs a move that is on the grid, also used in ship generation""""
    return (row >= 0 and row <= difficulty - 1) and (col >= 0 and col <= difficulty - 1)
As for the comments themselves, in the case of your is_valid function, the information that the function is also used in ship generation is not especially useful if you want to know what the function does. Also, that fact may change in the future and from experience, it's easy to forget to update comments when you change the code.

If your function modifies a parameter that is passed in, changes global state of some sort or has other side effects, it's important to document that. When it makes sense, it's also important to document the parameters for a function and the return value, especially in a language like Python where type information is generally implied by duck typing. (for a function like is_valid, that's not especially sensible given how small the function is)
 

Slavik81

Member
After some trial and error I finally got the extra credit codecademy battleship program working like I wanted to. 5x5 or 6x6 grid depending on user choice. A two-space sized ship and a three-space sized ship. Written in python.

https://github.com/Hazama/Codecademy/blob/master/battleshipextracredit.py

I'm looking for any general kind of feedback. Maybe I need to comment more, or less. Maybe some things aren't as obvious. Perhaps I did something very inefficiently. Maybe I need to put some stuff in functions, or maybe I made functions for things that didn't really need to be functions.

My midship generation works fine, but if I did the same method for 4 or 5 space sized ships the current generation method would be a doozy (for my novice self at least) to implement. Dunno if there is a better way to do it. Some people suggested some stuff here already, like cpp is king, but I didn't understand it too well.

I'll simply link the page containing the code, it is a really small ~150 line program but that might be too big to simply post on the forum with
Code:
 tags.[/QUOTE]
Overall structure is pretty good. The details are reasonable as well. A few simple things I noticed:

1. gen_board, is_valid, gen_small and gen_mid take a parameter called difficulty, but use it directly as the board size. It would be easier to understand if it were named board_size.

diff_select returns either 5 or 6. It's not immediately obvious what those values represent. I suggest instead just returning 'e' or 'h'.

The conversion from e/h to 5/6 could be done by another function called, for example, board_size_for_difficulty(difficulty).

2. Relating to is_valid, and is_occupied
if <condition>:
  return True
else:
  return False

is always better expressed as return <condition>

3. rand_col, rand_row could be 1 line

4. I'm not commenting on gen_mid because I'm not sure how to improve it. It's the most complex component of the entire thing, and would stand the most to gain, but it's also the most difficult to improve because it's so big.
 

Haly

One day I realized that sadness is just another word for not enough coffee.
I am close to enrolling in bloc.io after much introspection and gnashing of teeth. Simply put, I can't trust myself to remain committed to self-study and self-improvement so I need some kind of guidance and external motivation. I'm ruling out going back to college because I always hated the rigidity of it, and I feel pressured for time.

The question then becomes: iOS, Android or Ruby on Rails? I'd appreciate any input from people experienced in the mobile/webdev industries here. Primarily, I'm looking for demand for entry level programmers (I think they're all even-ish) and long-term stability (iOS and Android are the winners with Android slightly ahead?) but Ruby has its own appeal...
 

NotBacon

Member
I am close to enrolling in bloc.io after much introspection and gnashing of teeth. Simply put, I can't trust myself to remain committed to self-study and self-improvement so I need some kind of guidance and external motivation. I'm ruling out going back to college because I always hated the rigidity of it, and I feel pressured for time.

The question then becomes: iOS, Android or Ruby on Rails? I'd appreciate any input from people experienced in the mobile/webdev industries here. Primarily, I'm looking for demand for entry level programmers (I think they're all even-ish) and long-term stability (iOS and Android are the winners with Android slightly ahead?) but Ruby has its own appeal...

I don't think you can go wrong with those choices. Maybe dip your toes in each to see what you like? Download Xcode, Android Studio, and Rails, and then fiddle with each?
 

Haly

One day I realized that sadness is just another word for not enough coffee.
EDIT: Oh I see. Yeah I haven't considered that yet. I've only touched Ruby and Android very lightly.
 
C++ WHILE LOOP PROBLEM

Write a program to print all the numbers from n1 to n2, where n1
and n2 are two numbers specified by the user. (Hint: You&#8217;ll need to prompt for
two values n1 and n2; then initialize i to n1 and use n2 in the loop condition.)


here's my attempt, which doesn't seem to work:

#include <iostream>
using namespace std;

int main()
{
int n1, n2, i;

cout << "Enter left bound" << endl;
cin >> n1;

cout << "Enter right bound" << endl;
cin >> n2;

i=1;

while (n1<=i<=n2)
{cout << i << " ";
i=i+2;}

system("pause");
return 0;
}

If you enter the values n1=1, n2=10 the program spits out a never ending sequence of bullshit when i'm only looking for value between and including 1 and 10, specifically (1, 3, 5, 7 and 9)


-----------------------------------------------

OKAY SO

#include <iostream>
using namespace std;

int main()
{
int n1, n2, i;

cout << "Enter left bound" << endl;
cin >> n1;

cout << "Enter right bound" << endl;
cin >> n2;

i=n1;

while (i<=n2)
{cout << i << " ";
i=i+2;}

system("pause");
return 0;
}

setting i=n1 fixed the problem up, and i get my numbers 1,3,5,7,9.

but i still dont get why my first attempt resulted the way it did, i hope someone can explain it
 
Code:
while (n1<=i<=n2)

You can't do conditions like that. Well... you can, but it doesn't mean what you think it does.

Here's what it actually means:
<= obviously has the same order priority as <= (they're the same after all), so it's evaluated like this:
Code:
(n1 <= i) <= n2

So let's look at the first part:
Code:
(n1 <= i)
If n1 is smaller or equal to i, this returns true (1), otherwise false (0).

So what we've got is:
(0 or 1) <= n2

If n2 is larger than or equal to 1, that will always be true.

Conditions evaluate to values too (true or false) which in turn can be used in other conditions or even mathematical formulas.

What you meant to do was to separate that condition into two, that both need to be true for the whole condition to be true. This is done with && (and).
Code:
if (n1 <= i && i <= n2)
Now, n1 needs to me less than or equal to i, and i needs to be less than or equal to n2, which is the same as the mathematical notation: n1 &#8804; i &#8804; n2.
 

upandaway

Member
Could use a bit of advice. I need to choose between some math courses next year (2nd year CS), between:

Advanced Algebraic Structures (I have AS next semester)
Advanced Mathematical Logic
Introduction to Combinatorics
Graph Theory
Number Theory (<- was told to stay far away from this)

Minimum one of them and maximum 3 I think, taking away from optional CS courses later.
Logic looks hilariously easy, AAS looks like it could be useful? I really have no clue what the applications are for any of these. I like math but I'd like something with practical use.

Would love some input
 
D

Deleted member 30609

Unconfirmed Member
Could use a bit of advice. I need to choose between some math courses next year (2nd year CS), between:

Advanced Algebraic Structures (I have AS next semester)
Advanced Mathematical Logic
Introduction to Combinatorics
Graph Theory
Number Theory (<- was told to stay far away from this)

Minimum one of them and maximum 3 I think, taking away from optional CS courses later.
Logic looks hilariously easy, AAS looks like it could be useful? I really have no clue what the applications are for any of these. I like math but I'd like something with practical use.

Would love some input
do you have links to the course outlines or the handbook or something? Hard to give advice without knowing what's in each. :)
 

Haly

One day I realized that sadness is just another word for not enough coffee.
Just going by the names, I would rank them thus:

Introduction to Combinatorics
Graph Theory
Advanced Algebraic Structures
Advanced Mathematical Logic
Number Theory
From more practical to more theoretical (and less practical).
 

upandaway

Member
do you have links to the course outlines or the handbook or something? Hard to give advice without knowing what's in each. :)
Only one with an English syllabus is advanced algebraic structures

Logic is registered as the equivalent of Discrete Math 2 in the math faculty. Looking at a test from last year I think I can clear it right now, looks really easy.
Combinatorics: Counting, sorting, optimization, pigeonhole principle, stirling and bell (?) numbers... can't translate some of these
Graphs: looks to be a whole ton of definitions and proofs

I actually have a bunch of normal CS courses I want to ask about too but I need to sift through them first to see what's valid for next year
 

injurai

Banned
I took graph theory and combinatorics. Both are extremely useful to know. Mine were actually wrapped up together in the same course. I had gotten basic graph theory, but taking it in a high level mathematics course was way more illuminating. Graph theory comes up a lot. Combinatorics I feel is less useful since it mostly deals with counting. If your trying to count any sort of data structure in cs you just do it iteratively or recursively.
 

NotBacon

Member
Pretty funny because I had a course that had Logic, Combinatorics, Graphs, and Set Theory all wrapped into one. Was called Discrete Structures I think...
 

Haly

One day I realized that sadness is just another word for not enough coffee.
Yeah these are all topics that fall under "Discrete Math" or "Discrete Structures".

Name is really fuzzy though, and different colleges will describe the courses differently.
 

upandaway

Member
I did have discrete math already, it had about 2 4-hour lectures each on combinatorics, graph, logic, sets and relations, even some number theory with prime numbers and stuff, if that's what you guys mean. Those courses are supposed to go in more deeply though, they all have discrete math as a pre-requirement.
 

survivor

Banned
Could use a bit of advice. I need to choose between some math courses next year (2nd year CS), between:

Advanced Algebraic Structures (I have AS next semester)
Advanced Mathematical Logic
Introduction to Combinatorics
Graph Theory
Number Theory (<- was told to stay far away from this)

Minimum one of them and maximum 3 I think, taking away from optional CS courses later.
Logic looks hilariously easy, AAS looks like it could be useful? I really have no clue what the applications are for any of these. I like math but I'd like something with practical use.

Would love some input
If your school offers a Cryptography class I would take that instead of Number Theory. At my school, Crypto class was more theoretical and relied on some number theory to explain the algorithms and why they work. Could be a better way to learn number theory and still sort of be relevant to CS.
 

upandaway

Member
Thanks guys. My school is big on cyber/security so we definitely have a lot of that (though I don't think I want to go into cyber security). I'll check if the professors for graph/combinatorics are reasonable and probably choose one from those.

Kinda surprised no one mentioned AAS, I was leaning towards that at first, it looked good
 

Haly

One day I realized that sadness is just another word for not enough coffee.
It looked very abstract to me. You would be better off taking Linear Algebra, which has some overlap but more practical application in graphics programming and whatnot.
 

upandaway

Member
It looked very abstract to me. You would be better off taking Linear Algebra, which has some overlap but more practical application in graphics programming and whatnot.
I'm about to wrap up a year of Linear Algebra and it's a prereq for the course, yeah Linear material was popping up left and right in most of the other courses. For now Graph Theory seems good.

Also after going over the CS optional courses, a really big chunk (~2/3) are either security or robotics, with a bit of natural language and databases. I'm not really into security or robotics so that's somewhat of a bummer. Is there any point in cyber security courses that's useful outside of working in that field?
 
I'm so worried. I graduate in the spring with a BS in CS and Info Systems, and I know a lot of code.

Learning so much has only shown me that I know nothing really and I'm super stressed about employment.

For those of you employed as programmers, how much did you learn "on the job" and how much did your employer expect you to know?

Technical interview dread has given me nightmares.
 
I'm so worried. I graduate in the spring with a BS in CS and Info Systems, and I know a lot of code.

Learning so much has only shown me that I know nothing really and I'm super stressed about employment.

For those of you employed as programmers, how much did you learn "on the job" and how much did your employer expect you to know?

Technical interview dread has given me nightmares.

You learn everything on the job, you just need to approach it right.

Force yourself to learn new things, read those docs, implement those good practices, read what the community is doing, write those tests, refactor your code, read a lot, google then ask if you still don't understand. Never be afraid to said "I don't know".
 
You learn everything on the job, you just need to approach it right.

Force yourself to learn new things, read those docs, implement those good practices, read what the community is doing, write those tests, refactor your code, read a lot, google then ask if you still don't understand. Never be afraid to said "I don't know".

Thank you. You've really made me feel better.
 

survivor

Banned
I'm so worried. I graduate in the spring with a BS in CS and Info Systems, and I know a lot of code.

Learning so much has only shown me that I know nothing really and I'm super stressed about employment.

For those of you employed as programmers, how much did you learn "on the job" and how much did your employer expect you to know?

Technical interview dread has given me nightmares.
Large companies will train you on what you need to know and since you are a new grad they pretty much don't expect much out of you. You are an investment that will grow within the company and be productive eventually. If their interview process like most companies in the industry, they basically just want to see if you know your basic CS data structures and algorithms and can program in whatever language they use.
 

Anduril

Member
I know this is late and might not be exactly what you need, but have you looked into RecyclerView?

You could make a die layout xml, and use that as the item layout in your RecyclerViewAdapter (have to custom make, but there are lots of examples online). Do all the styling framework for an individual die in that layout. In the custom adapter, you can assign specific data to each object using an ArrayList or something like that. You can use a FrameLayout for your RecyclerView's layout manager and organize the columns and such using that.

Just the first thing that popped into my head, but I'm not sure exactly what you're trying to accomplish.
Hey,

sorry for the late reply and thank you so much for suggesting this! I kinda gave up on the thread and it took me a while to see someone replied. :)

RecyclerView looks just what I need design-wise, though I've been trying to implement it based on this guide for a few days and it's driving me nuts.

I need to override the onBindViewHolder and do this:

Code:
personViewHolder.personPhoto.setImageResource(persons.get(i).photoId);

... but the photoId is generated as a string in a method in my Die class. For the life of me I cant figure out how to successfully change the string into an int (that setImageResource takes) and access it from an activity. Argh. Help? :D
 

iapetus

Scary Euro Man
I need to override the onBindViewHolder and do this:

Code:
personViewHolder.personPhoto.setImageResource(persons.get(i).photoId);

... but the photoId is generated as a string in a method in my Die class. For the life of me I cant figure out how to successfully change the string into an int (that setImageResource takes) and access it from an activity. Argh. Help? :D

That's... an odd way of doing things. Why have you got a string there? What does it contain? If it's the name of the drawable resource then you *could* use reflection, but this seems like an insane way to do things...
 

Anduril

Member
That's... an odd way of doing things. Why have you got a string there? What does it contain? If it's the name of the drawable resource then you *could* use reflection, but this seems like an insane way to do things...

Cause I'm seriously new to programming and just starting out with my first app and don't know how to do it better? :D

I have a Die class with an int numberOfSides variable and a method that rolls the die and gets a result. I then combine the numberOfSides and result into a variable that starts with a letter, since trying to have image files with no letters gave me all sorts of errors.

Something like this:

Code:
imageId = "d"+mNumberOfSides+"_"+mResult;

Insane? I have no idea. :p
 

Husker86

Member
Hey,

sorry for the late reply and thank you so much for suggesting this! I kinda gave up on the thread and it took me a while to see someone replied. :)

RecyclerView looks just what I need design-wise, though I've been trying to implement it based on this guide for a few days and it's driving me nuts.

I need to override the onBindViewHolder and do this:

Code:
personViewHolder.personPhoto.setImageResource(persons.get(i).photoId);

... but the photoId is generated as a string in a method in my Die class. For the life of me I cant figure out how to successfully change the string into an int (that setImageResource takes) and access it from an activity. Argh. Help? :D

Here is where you're String deal is a problem. You're going to have to set up a switch/case or something to be able to get an int id from your string (if that string is indeed the exact name of your resource).

Maybe a method like:
Code:
private int getResId(String whyAreYouDoingItThisWay){
   switch(whyAreYouDoingItThisWay){
        case "d5_3":
            return R.drawable.d5_3;
            break;
        case blah blah blah
   }
}

I think you need to rethink your variable type for photoId and what it holds.
 
So, I'm taking a Java class through a local community college. It's a class directly corresponding to the Oracle SE 7 Certification. While it's normally a 16 week course, I'm doing it in 10 due to summer classes being shorter.

Anyways, I also have a full time job, and when I'm not working, I'm constantly learning Java. To the point that it's almost all I can think about. To the point that I kinda don't want to think about it ever again anymore. Ugh. I like it, but everything is coming at me so fast that I can't keep up with what are probably basic concepts. If I don't have my textbook in front of me, I probably couldn't even write my own method on my own.

Anyways, how did you guys learn and get it to "stick?" Because I'm struggling. I need time for my brain to decompress and take in everything, but I'm not getting it due to my insane amounts of homework and strict due dates. I'm working on it about 3 hours every single night.
 

maeh2k

Member
So, I'm taking a Java class through a local community college. It's a class directly corresponding to the Oracle SE 7 Certification. While it's normally a 16 week course, I'm doing it in 10 due to summer classes being shorter.

Anyways, I also have a full time job, and when I'm not working, I'm constantly learning Java. To the point that it's almost all I can think about. To the point that I kinda don't want to think about it ever again anymore. Ugh. I like it, but everything is coming at me so fast that I can't keep up with what are probably basic concepts. If I don't have my textbook in front of me, I probably couldn't even write my own method on my own.

Anyways, how did you guys learn and get it to "stick?" Because I'm struggling. I need time for my brain to decompress and take in everything, but I'm not getting it due to my insane amounts of homework and strict due dates. I'm working on it about 3 hours every single night.

Maybe try doing a Kata repeatedly. Take this one, for example: http://osherove.com/tdd-kata-1/

The goal is basically to reimplement the program every day in a time box of maybe 30 minutes. If you don't complete it in that time, that's okay. Since you solve the same problem repeatedly, you get faster over time.
 

Water

Member
So, I'm taking a Java class through a local community college. It's a class directly corresponding to the Oracle SE 7 Certification. While it's normally a 16 week course, I'm doing it in 10 due to summer classes being shorter.

Anyways, I also have a full time job, and when I'm not working, I'm constantly learning Java. To the point that it's almost all I can think about. To the point that I kinda don't want to think about it ever again anymore. Ugh. I like it, but everything is coming at me so fast that I can't keep up with what are probably basic concepts. If I don't have my textbook in front of me, I probably couldn't even write my own method on my own.

Anyways, how did you guys learn and get it to "stick?" Because I'm struggling. I need time for my brain to decompress and take in everything, but I'm not getting it due to my insane amounts of homework and strict due dates. I'm working on it about 3 hours every single night.
Sounds like the class is moving too fast for you, but I dunno if there's much you can do about that. Hang on and trust that things will get easier once you are over the initial hump.

Had you more time, it'd be best to spend it not on worrying about the latest complex concept you've been taught, but freeform practice, playing around with basic stuff, just getting inspired and writing / modifying programs to do stuff that comes into mind. "Okay, this simple program does X, but would it still work if I wrote it in this other way? And can I modify it to also do Y?"
Try to find enough breathing room to get curious. Spending some time to satisfy your curiosity is fun, not stressful.
 
Great ideas, thanks guys. I don't really have any programming experience outside of some basic VBA/Excel stuff, and the "prerequisite" to this class was a total joke. Nothing but pseudocode that didn't really teach me anything.

Is there a good/decent web-based IDE that I could use to practice in? I get some free time while at work, but I can't install and IDE on my work computer. I found a few through google, but I didn't know if there was a preferred one by the pros.
 

vypek

Member
Is there a really great resource for learning SQL online? I've recently started teaching it to myself with w3schools.com but I'm curious if there is a better place to learn and practice it. I feel that missing out on the class during my undergrad has really hurt me during my recent job search. I think I'd have a little better success if I could list it on my résumé as something I'm very familiar with.
 
Is there a really great resource for learning SQL online? I've recently started teaching it to myself with w3schools.com but I'm curious if there is a better place to learn and practice it. I feel that missing out on the class during my undergrad has really hurt me during my recent job search. I think I'd have a little better success if I could list it on my résumé as something I'm very familiar with.

I can't vouch for it, but folks seem to like Khan Academy, and they have SQL courses.

https://www.khanacademy.org/computing/computer-programming/sql
 

Slavik81

Member
Maybe try doing a Kata repeatedly. Take this one, for example: http://osherove.com/tdd-kata-1/

The goal is basically to reimplement the program every day in a time box of maybe 30 minutes. If you don't complete it in that time, that's okay. Since you solve the same problem repeatedly, you get faster over time.

Writing the same program over and over until you can do it really quickly strikes me as a very weird task.
 

V_Arnold

Member
Writing the same program over and over until you can do it really quickly strikes me as a very weird task.

It is not rally about quickness, it is about finding different ways to do the same task. It can be very eye-opening (and, I would assume, would train your brain to look for new ways when the old ones fail).
(Edit: i managed to confuse this one with the other kata-link, the codewars one, where you can see different implementations as well, and THOSE are fantastic :D.... Well, ill show myself out :p)
 
Top Bottom