d2jsp
Log InRegister
d2jsp Forums > Off-Topic > Computers & IT > Programming & Development > Make Me A Better Programmer - From Step 1
Prev1151617181956Next
Add Reply New Topic New Poll
Member
Posts: 23,862
Joined: Aug 16 2006
Gold: 20.00
Nov 25 2012 01:50am
Quote (Caleb7 @ Nov 25 2012 12:26am)
should have went to google first imo
simple shit


rly dude.
Member
Posts: 23,862
Joined: Aug 16 2006
Gold: 20.00
Nov 25 2012 05:50am
Got it working for all cases! woo!


Had to change my search function. It was the CRUTCH of my entire program, maybe more like a pillar that supported everything else.

now it looks like this


Code
person *tree_search(string input, person *head)
{
   person *p = NULL;

   if (head == NULL)
   {
       return NULL;
   }
   if (head->get_name() == input)
   {
       return head;
   }
   if (head->spouse != NULL && head->spouse->get_name() == input)
   {
       return head->spouse;
   }
   if (head->sibling != NULL)
   {
       p = tree_search(input, head->sibling);
   }
   if (head->kids != NULL && p == NULL)
   {
       return tree_search(input, head->kids);
   }
   return p;
}


Had to ask for assistance from a friend proficient in C who noticed the glaring errors with my old iterations of it.

Would I have caught it on my own eventually? I think so. I got into the habit of running through my code systematically vs a set of inputs and seeing where things go etc.

I need to learn how to debug one of these days ~_~

This post was edited by Eep on Nov 25 2012 06:06am
Member
Posts: 23,862
Joined: Aug 16 2006
Gold: 20.00
Nov 28 2012 02:18am
I had to make a few more changes to the program before it was TRULY finished but now it is.

With that, I am finished with projects for CS2250 - Programming and data structures. I learned a lot from this class.

When I first started the class I had no idea what the title stood for, now I know.

Abstract data structures etc. Trees, queues, stacks, linked lists....

I am taking a bunch of random stuff in the spring

Architecture, system programming (?) or whatever, and object oriented programming
Member
Posts: 892
Joined: Aug 4 2004
Gold: 7,504.90
Nov 28 2012 06:27am
Very interesting.
Member
Posts: 11,637
Joined: Feb 2 2004
Gold: 434.84
Nov 28 2012 10:01am
Quote (Programming @ Nov 28 2012 07:27am)
Very interesting.


Sweet contribution, brah.
Member
Posts: 23,862
Joined: Aug 16 2006
Gold: 20.00
Nov 28 2012 10:49am
Quote (rockonkenshin @ Nov 28 2012 11:01am)
Sweet contribution, brah.


At least his name is relevant
Member
Posts: 34,161
Joined: Nov 21 2007
Gold: 0.00
Nov 30 2012 06:55am
was reading till the end of page one lmao! people are madd!!
Member
Posts: 23,862
Joined: Aug 16 2006
Gold: 20.00
Dec 2 2012 05:37am
Quote (PoisonDeath @ Nov 30 2012 07:55am)
was reading till the end of page one lmao! people are madd!!


that's why you don't read til the end of the first page only bro

I put in that work

This post was edited by Eep on Dec 2 2012 05:37am
Member
Posts: 23,862
Joined: Aug 16 2006
Gold: 20.00
Dec 3 2012 03:14pm
Last lecture ended today. Talked about exception handling and about creating classes specifically to handle exceptions within classes.
Member
Posts: 23,862
Joined: Aug 16 2006
Gold: 20.00
Dec 7 2012 05:09am
Signed up for all my spring stuff

I am taking:

Quote
CMP SCI 2261 Object-Oriented Programming (3) Prerequisites: CMP SCI 2250. Introduces object-oriented concepts, terminology, and notation (UML) using Java. Covers encapsulation, classes, objects, inheritance, and the use of class libraries. Additional topics may include graphical user interfaces, applets, and related tools and technologies.

CMP SCI 2700 Computer Organization and Architecture (3) Prerequisite: CMP SCI 2250. Introduces details of computer systems from architectural and organizational points of view. Covers data representation, basic digital logic circuits, memory types and hierarchies, I/O and storage devices, CPU architectures such as RISC, CISC, parallel, and multi-core.

CMP SCI 2750 System Programming and Tools (3) Prerequisite: CMP SCI 2250. Covers systems programming, scripting, libraries,utilities, and development tools. Additional programming topics include piping,binary files, exception handling, command-line arguments and symbolic debugging.
This course also explores tools available in the Unix/Linus environments.


and Discrete Structures (not looking forward to this one based on some minor horror stories I've heard ~_~)
Go Back To Programming & Development Topic List
Prev1151617181956Next
Add Reply New Topic New Poll