Digital Dave

Musings on projects, business and life.

Icon

monday…

So, today was pretty interesting.  I didn’t have my first 8:30 class, and thenI found out my 1:30 philosophy class was canceled.  So, all I had was finance at 11:30. What sort of luck is it when you nail 2 cancellations in one day?  I was hoping for that third, but it never came.

So the network coding assignment was pushed back until today due to last week being the career fair, and a lot of students were a little more concerned with finding a job.  The project ended up “alright,” in my book.  I was trying to figure out threading at the same time I was figuring out how the server and client interact, and, well, the threading tripped me up a little.  The UDP version + Sniffer turned out just fine.  It was just the TCP version that had some issues with connecting with more than 1 client.

All in all, it was a fun little assignment, but I’m looking forward to the next one even more.  I’ll definitely have threads and the connections ironed out by then.  We’re to develop a client / server chat application that will also have a directory of other servers (implemented by using RPC or RMI).   Extra credit is to keep a tab on the servers, and updating the directory if a server ended its session.  Doesn’t sound too difficult.  We’ll find out.  I’m debating on developing it in C# or Java, but I’m leaning a little more on C#.

Alright, I’m off to do some reading. Peace, journal land!

Oh, yeah.  So, my investment portfolio is up 19.5% (6 months). Right on!  If your money is just sitting in your bank account, bringing in a few % of interest a year, you might consider starting an investment account at Scottrade for $500.  Take a deep breath, and dive in, what do you have to lose? Time?  Good luck!

In my finance class, our portfolio is up about $65,000.  I made one of my best stock picks last Thursday, and I made one of my saddest mistakes today.   Let’s just leave it as: If you invest, and your stock runs up 50% in two days, SELL 3/4, or at LEAST 1/2.  That one stock I picked, ran up 60k.  I ended up selling it today at ~20k. But, to end, I still <3 China (for now).
Ok, time to go read. For real.

trying to make some a’s

I have been incredibly busy.

Exam time has rolled around. I just finished one of my exams, and I have 2 more to complete by the end of the week.

I’ve also been working on my networking programming assignment. Things are going well, and that’ll be finished by Friday.

Career fair starts tomorrow. There are a few companies that I would like to speak too, but I’ll be skipping it this semester. I do need to find an internship for next summer, but I ‘think’ I would have a better time if I wait until next semester when our actual engineering career fair rolls around. I’ll still be looking for a job, just via the internet and job openings. I’m setting my sights high, and then I’ll work my way down if things don’t work out. I just want to find a solid company where I can contribute something great to people now or in the future, while giving me an opportunity to grow. So I will be going after Microsoft(*wishful thinking*), Lockheed (I’m sure they’ll like another jarhead), Google (*wishful thinking*), Cerner (local), Garmin (local)… Just to name a few.

Alright, off to study for a philosophy exam and to do some programming.

Oh, and feel free to check out my wacky dog: YouTUBE

network coding

This morning was pretty darn cold! I’m not excited for fall to come to town, but at least Calix should be happy.

I did a little network programming for the first time, ever. I have a programming project that looks like it will be pretty fun. The goal is to develop a client/server interaction, where the server allows a user to input a ‘guess’ on how the point spread will end up for our football games. Each week, the server administrator can add a game, like KSU vs KU, and allow users to guess. Only one guess is allowed per user name, but multiple users can be created by the same individual.

Once a guess has been put into the server, the server will keep track of the median from the input. This way, it’ll be easy to clarify a winner.

So the sample that I worked out was (u as in user):

U1 enters [+3] Median – +3
U2 enters +3 [+5] +4
U3 enters +3 +5 [+7] +5
U4 enters +3 +5 +7 [+10] +6
U5 enters +3 +5 +7 [+9] +10 +7
U6 enters [+2] +3 +5 +7 +9 +10 +6

So lets say the score ends up being KSU 15, KU 3. Point spread of +12. With a final line (median) score of+6

Now the final difference will be 12 – 6 which equals a +6.

So now we can easily calculate the winner.

Un = ‘guess’ – ‘final line’
U1 = +3 – 6 = -3
U2 = +5 – 6 = -1
U3 = +7 – 6 = 1
U4 = +10 – 6 = 4 <- Winner!
U5 = +9 – 6 = 3
U5 = +2 -6 = -4

I’m pretty sure this is how it is going to work. Nothing like receiving a massive amount of text on an assignment sheet, and sitting there for 10 minutes dissecting it.

I’ll need to implement two versions, a UDP version, which revolves around just a single connection, and a TCP connection, which allows multiple users to send data.

And, as if this wasn’t enough, I get to make a protocol sniffer to act as a middle man between the client and the server.

I’ve got the basic framework for the server and client done, thanks too msdn. But the basic idea of servers and clients are not too incredibly difficult to grasp. For the server: Init winsock, open a socket, bind to a port, accept connections, send and receive data. The client is darn near the same: Init winsock, open a socket, connect to a port, send and receive data.

One cool thing about this class is, we can develop in anything (almost) we really want too. Visual Basic, Java, C/C++, C#. I’ll be coding in C++ and using either Visual Basic or C# when we get to projects that need a GUI, maybe. I haven’t fully decided if I want to stick with C++ or not for that.

Good times.

what a long day…

The weekend was consumed by mostly studying for a biology exam, and spending time with the girlfriend. I did do a bit of coding for my networking class, and I feel like it was a good project. Coded in linux, c, and utilizing fork(). The project was to develop an alarm clock that goes off after 4 seconds, and then 8, 16, 32, 64 seconds. Each time, it’ll beep and increment the beeps by one – up to five times, and quit.

So I essentially created a child to maintain the alarm clock, while I let the parent keep track of the user pressing the off button (‘enter’). Once the user pressed enter, or the alarm hit the max amount of tries, I sent a SIGQUIT to kill off the process. Good times.

Today was a loooong day. I went to campus at 8 a.m, and got back home around 6 p.m. Now, if I was coding from 8 to 6, that’d be perfect… But with finance, philosophy, and biology in the mix…

I have 31 hours until I can claim my B.S. in Computer and Information Sciences. 17 of those hours are unrestricted electives, while a good majority are other CIS courses…

I’ve been trying to figure out what I want to take for those unrestricted electives. I’ve got to take 16 hours for the spring semester, and the fall semester, of next year, to graduate in December 08… So I can’t start making crazy hard schedules. But, that’s the problem… If I had my way, I’d use most of all of those unrestricted electives on CIS courses. But, too many CIS courses, could likely drive somebody to depression… Ha-ha! There are some really good ones that I’m interested in, though.

Right now, It looks like

Spring 08
=======
3hr CIS562 – Data modeling for business apps, database management, scripting languages, and much more…

Fall 08
=====
3hr CIS543 – Software engineering design project that involves design, analysis, and implementation.
3hr CIS597 – An information systems project that involves design, analysis, and implementation.
3hr ENGLXXX – TBD

For each of these semesters, I need 3 more classes… Yikes. :|

On the CIS side of the house, I’d be interested in taking:
CIS520 – Operating Systems. This is an extremely difficult class due to the time involvement. Mostly recommended to be taken with a semester of only 13 hours. So, I’m not sure about this one.
CIS625 – Parallel Programming
CIS635 – Intro to Computer-Based Knowledge Systems.

Ah, decisions, decisions… I’ll have to beat up my adviser for some advice for once.

One thing is certain… There shouldn’t be any doubt of my programming abilities after next year…

Scholarship for the 2007-2008 academic year

I’m pretty excited.  I ended up receiving a scholarship that pays for my tuition/fees for this academic school year.  It couldn’t have come at a better time.  My G.I. bill runs dry in December.   I didn’t expect this, but my thanks goes to those who gave me this opportunity.

For those that are curious, it was received for military service during Iraqi Freedom.

A* v.010 Release

Philosophy nearly warped my mind… I almost didn’t get the testing completed, and I still might not have found everything. But, as promised, here is the program and source code for my little trial run with artificial intelligence.

Download File: 10.31KB Get It Now! ASharp-v010.zip

Inside you will find the executable, source file, and a readme.

If you decide to fiddle with it, I would be happy to see what you’ve done. Feel free to write me anytime.

I expect to begin the graphical representation of this tomorrow. I’m thinking about flipping over to C# to implement it, but we’ll see.

Happy Programming!

A* Complete

I’ve completed the console A* program. All that needs to be done is some polish for distribution.

As far as the console goes, it’s not incredibly exciting. It’s not exactly feature rich, and it only serves to understand the basis of the artificial intelligence pathfinding algorithm A*.

The map is edited within the compiler. You just change the HEIGHT and WIDTH defines, then modify the 2D array, and you’re set.
1: Wall ; 2: Start Node ; 9: End Node

Then once you cycle through the solution, you’ll be shown the optimal path. Now, as you can see with this example, at about the middle, the path moves up, and then comes back down to a diagonal position (SE). I blame it on the heuristic.
5: Path

I’m going to read some philosophy and then get a distribution ready to fly.  Check back later.

A* Progress

My entire weekend was consumed by the girlfriend coming up to visit, and catching up on some reading for school.

But I did have a few hours tonight to try to finish up on the program.  I’ve nearly got it complete, but I’ve got one lingering issue that I just need some more time to fine tune.

And with that, a dull entry is made.  I hope to complete this tomorrow, pending my philosophy doesn’t take forever to read.

David McGraw

Founder of iGotIt Games. Trader. Runner. Warrior. Motivator.