-->

Friday, November 7, 2014

Chronicles of a New PC Parts Shopper - Experiences from a Newb


Hello again bloggers! Excuse the lack of updates, but this author has so many insights into the world of computing that its sometimes difficult to find time to bring all back here!

On that note, lets talk about something other than pure coding:

Hardware.

Yes we're talking about how to build your own computer.

For yours truly it was simple enough. As a gaming enthusiast, one of my favorites is the Elder Scrolls V: Skyrim. Not for the gameplay itself mind you, but for the ability to create your own spin on it via its excellent mod community. And let me tell you, such a hobby will teach you a thing or two about testing discipline, watching out for inter-dependencies, and having a clear plan and backlog to discipline yourself with; a crucial aspect of system design once one graduates to the level of incorporating formal patterns and engineering concepts into their software.

But I've never been much of a hardware kind of guy; I learned how to install a graphics card two years ago and that was it. Yet the need to continuously test eventually won me over into doing my research into the matter.  My, the things I have learned!

Where to begin this chronicle? Perhaps by dividing things into chunks first, and working on it from there.

In between so I hope to eventually share what I've been learning about advanced code concepts, ultimately reaching the point where I may present videos on a variety of different topics. Maybe. But for now, lets begin with the Chronicles of a PC Parts Shopper.

Chronicles of a PC Parts Shopper

Where I Was With My Computing - 2011
  • How I'd gotten my computers in the past. Laptops and what not; my dad's Pavillion, etc.

The First Graphics Card - WOW
  • How my Sapphite first blew me away and took me to the land of PC Gaming
  • How installation was no different than hooking up a TV.
  • How even a grocery store cashier could afford it.
  • Dual Monitoring = More Productivity

Research Sites Best Found
  • PassMark -
  • Game Debate - http://www.game-debate.com/hardware/index.php?list=gfxDesktop
  • Amazon.com Shopping
  • Include tips on bookmarking this stuff.
The 2013 Need to Expand
  • Computer too slow for my needs
  • Games like Battlefield and Just Cause, and software like eclispe
  • Afraid to too computer off wastes electricity
  • Tweaking big pieces of software needs speed; this includes browsers and whatnot.

The Second Graphics Card - Meh
  • My first experiences with "Bottlenecks" 
  • Before 770 (Just Cause and Battlefield): 30 FPS on medium high. After: 40 on only slightly higher settings 
  • Need new processor, and for that, you need a new CPU.
  • Odd colors on HDMI
Attitudes to Take in CPU Shopping
  • Overview: What I'd do over: The order of the parts I bought. 
  • How snatching the first good deal on a decent motherboard I could fine limited my choices
Start With Core Part First: Video Card and PSU
  • Need MORE power or...you no can plug in. Best to overshoot.
  • Differences discovered between AMD and NVidia. 
    • AMD = Price Efficient. NVidia = Power Mad
  • The hard choice between 2 GB and 4 GB 770s ~ How everyone pushed me on more speed...and why I'd learn that actually, video ram DOES matter.
  • Let the old cards sit somewhere...or maybe sell?
Next, CASE: the foundation.
  • How I discovered that mid-tower =/= medium.
  • Pizza Box, Shoe Box, Desktop, Towers.
  • How Towers are WAY more convenient for customizing stuff.
Frivolous stuff next: RAM, HDD, SSD, or SSHD [add links for comparison vids]
  • Good news everyone; they discovered how to make Hard Drives FASTER. 
  • External Storage and...cloud?
  • Who needs more than 8 gigs?
    •  People like me who like to open way too many tabs WHILE downloading something WHILE being alt+tabbed out on a game, WHILE copying/installing stuff, WHILE dual monitoring some HDMIs.
  • Some things I thought I'd need but didn't: Turns out you DON'T need to buy an Ethernet port, that's built in. As is a wireless networking card?
NOW buy the motherboard and CPU TOGETHER
  • Start with the CPU first.
    •  What are slots? 
      • The reason I have to go 3770k instead of 4770k apparently
      • So get CPU First, then its motherboard
Finally, Operating System
  • Windows 8.1 Supposedly Faster?
Growing a PC is like Growing a Plant, or a Slow Cooked Meal. Or a Pregnancy. Or something. Enjoy the Journey. Take Pictures.

~Code Crunch Corner~

Thought Experiments for the Layman II: What is a Human?

::continued from this post, where we are having a hypothetical conversation with a non-programmer named Jessica::

"Describe yourself."

"I'm currently in college studying..."

"Too specific. Lets say were a programmer trying to create a hyper-realistic virtual copy of you. Can you be a little more vague in describing your attributes?"

"Oh. Um, lets see, I'm a girl. 25 years old. Um, American. Brown eyes?"

"This is a step in the right direction. You're still being too specific however. Would you like to know how I would first describe myself to this magical matrix computer of ours?"

"How?"

"David Morris, is a lifeform."

"Huh?"

"Would you like me to be more specific?"

"Yeah, sure."

"David Morris, is a lifeform that happens to be a mammal."

"Well, duh, right?"

"David Morris is a lifeform that happens to be a mammal that happens to be a hominid that happens to be human. Are you starting to see a pattern here?"

"Oh I'm starting to get it now."

"In programming, starting with the details is a trap. The key is to be as deliberately vague."

"I think I kinda getting it?"

"For example, did you know that you share 92% of your genetic code with a mouse?"

"I do?!"

"Yeah, turns out that the code for 'This is the basic gist of how a blood cell works' is the same? You have code that tells you to breath oxygen and grow five fingers? Gasp, a chimp has the very same code in their DNA too! What a coincidence. You must be cousins!"

"Ha ha. Yeah right. I definitely see what your saying."  :)

"Exactly. First you tell the computer: This is a concept for a Lifeform. Here is code for ALL things Lifeforms share, no matter what. Load that in. This is a Mammal. Here is the code for ALL things Mammals share, no matter what. Load that in. This is a Hominid. Here is the code blah blah. Stack that on top of everything else. Etc."

"Oh I see!"

"Right. You're extending layers upon layers of instructions on top of each other, until you get to the final result of the thing you want.  You save the final descriptive stuff, like height and hair color, until the very end. Get it?"

"That makes sense!"

"Now if we want to add puppies to our super simulator, guess what? More than half the work is already done!"

"Woah! You're right. That would be convenient! Because we already told it what mammals are, so the basic idea that is should, I don't know, have a stomach to rub is already done!" :)

"Now you're getting it! This is the power of inheritance and encapsulation! Of being deliberately vague and ABSTRACT!"

"Cool!"

"So, describe yourself now."

"I am a Lifeform that happens to be a Mammal that happens to be a Human. Brown hair, brown eyes. Girl. 25 years old."

"Much better. Though it begs the question..."

"What?"

"Does you're being a girl really have to do with your DNA? Last I checked, I have testosterone, and so do you. And our brains and bodies both react to them the same. You have estrogen. So do I. And the code for how we react to them is exactly the same."

"Hmm."

"The only difference is in the amount of the stuff we get. Men have x50 times more testosterone methinks. While women have x20 more estrogen. Yet how a Human should react to them is the same."

"Hmm. Right. Gender is about our chromosomes right?"

"Precisely. The very last one. Here, you'd define, or encapsulate how a human should modify its production levels with what's known as an interface that a specific human instance to...equip you could say."

"Hmm?"

"So, when we tell the computer to make a version of you, we'd tell it something along the lines of Jessica = new Human (with brown eyes, hair, etc).

"Ok."

"For myself however, we'd have David = new Human (with blah blah details) and implements MaleGender behavior. We defined earlier a Gender interface, and all it does is 'modify the testosterone code (already present in all humans) so that its boosted by whatever percent."

"Oh, I think I see."

"So this is what Object Oriented Programming is all about. Does this help illustrate the mindset?"

"I think so. Thanks!"

~Code Crunch Corner~

Thought Experiments for the Layman I: Procedural Programming

When explaining object oriented programming to a layman, there's a thought experiment that I generally put them through. Say I'm talking to a hypothetical non-coder and she wonders what OOP is. The conversation would go something like this :

"What is object oriented programming?"

"Well Jessica, I'm glad you asked. Object oriented programming its a highly convenient mindset of coding techniques that enables you to avoid the dreaded inconvenience of procedural programming."

"Huh? Procedural programming?"

"You know how in comedies, they might introduce a zany engineering character with his ability to build a Rube Goldberg Machine. An over-engineered, hyper complicated, step by step chain-reaction contraptions to do a simple task?"


"Oh yeah."

"That's procedural programming in a nutshell. As  you can imagine, all kinds of things can go wrong. And debugging such a system would be a nightmare!"

"I see. So what's object oriented programming?"

"Alright, to get the concept of object oriented programming, lets do a little thought experiment. Describe yourself."

::continued::

Wednesday, October 8, 2014

Instructional Highlights: Head First by O'Reilly Publishing

People often ask how I learned to be a programmer despite not fully majoring in it.

The answer is simple: Interest and resources.

Interest leads to skill, and when one is interested, they simply find themselves compelled to practice. Over the course of my technical training, I've come to a number of excellent resources. Today I wished to spotlight the Head First Book Series.

This series understands better than any textbooks I've read, how to introduce engineering concepts in a manner that is simplified, informative, engaging, and just darn fun, leaving you with real expertise in a manner that you'll remember.

They accomplish this at a very low price point  among textbooks, easily worth two or three of the $80 textbooks that may be required of you by a college course.

Check a copy out at your library to see for yourself for free, or simply browse by their listings at Amazon.com and read the customer reviews. If you're interested in expanding your software skills, Head First will not disappoint.

~David Morrist~

Monday, March 31, 2014

Interfaces and Abstractions

Sometimes, you need to seperate an specific kind of object from the behavior it possesses from other objects similiar to it. Here is where interfaces and inheritance comes in. Say you wanted to develop a video game with, shockingly enough, enemies to fight.

Say this was a first person shooter, like Halo. In that game you have super brave Elite mooks, cowardly Grunts, and normal types like Jackals.

In that case, the first thing you'd want to do is code to an Abstraction. Because there are differences, a super class (we'll just call it enemy) can help consolidate that which all of these characters will share. Such as basic statitics like hit points, defensive ratings, and movement. By coding to an abstraction, you can let your game know that things like this will ALWAYS be present, while allowing subclasses to iron out the details in the DIFFERENCEs.

public abstract class Enemy{
//here you'll have your basic constructor and methods for defining the basics of an "enemy" like how they are hostile to you and your friends 

setHP()
setDefense()
setMovementSpeed()
setDeathCry()
}

public class EliteMook extends Enemy{
int HP;
int moveSpeed;

public void setHP(){
HP = 9000;
}

public void setSpeed
moveSpeed = 30;
}
//blah blah more methods and stuff
}


But what about the thing that would really make the different enemies interesting? What about differences in BEHAVIOR? Here is where interfaces come in.

Interfaces are not objects. They're a bundled package of references to methods.  Interfaces are like contracts for a concrete class, that can only be implemented by other objects, or extended into further sub-interfaces. So in a way, they are kinda like "equipment" packages for an object to use to better define its sets of behavior. These packages are formally known as APIs (Application Programming Interfaces).

So in returning to our example, you'll different AI behavior interfaces such as...

public interface EliteMookBehavior()
public interface NormalMookBehavior()
public interface CowardlyMookBehavior()

And what if there were different types of weapons as well? And say you wanted Elite Mooks to know how to use pistols and rifles, and swords, while the lowest of the low only got dinky pistols? Again, separate the behavior as interfaces.

public interface SwordBehavior()
public interface RifleBehavior()
public interface PistolBehavior()


That way, can keep your pathetic grunts pathetic by equipping them as such:

public class Grunt extends Enemy implements CowardlyMookBehavior, PistolBehavior{
/**Now all you have to do is set stuff like their 
HP and movement speed and you're done here */
}

While your mighty Elites remain feeling elite by equipping their behavior as so.

public class EliteMook extends Enemy implements EliteMookBehavior, SwordBehavior, RifleBehavior, PistolBehavior{

/**Now then, all you have to do is set stuff like their 
HP and movement speed and you're done here as well */
}

And now that you have them all, you can thus store them all in a single array called Enemy. Such is one of the main usefulness behind polymorphism. That way, the first mook may be Elite, followed by two grunts in one case, while it can be a couple of normies a grunt, and an Elite mook to mow down in another case.

And there you have it.  A plain, common sense introduction into abstraction, interfaces, and polymorphism. If you relate well enough videogames at least.

~Code Crunch Corner~


Sunday, January 26, 2014

Observation: Graphics Cards Are for Everyone

Due to a shortage of work assignments this January (schools where I teach are snowed in), I decided I was overbudget for my new PC. For now, it was best to sell my GTX 770 graphics card and buy a better one later. I didn't wish to bother bringing my old Radeon 6850 out of retirement however.

Afterall, my CPU is still a state of the art i7! Surely taking away her pet graphics card won't make a difference to my general computing, right?

Right?

Turns out I was wrong.
~Meet my Happy Intel i7 (and her pet GTX 770)~

 A central processor, as is communally known, is an extremely busy device responsible for the heavy burden of giving life to your computer. They can do the duties of a graphical processor on top of running things in the background, but unsurprisingly, they really, really, really, don't like doing more than they have to if it can be helped.

Upon removal of its 770 puppy, my Intel i7 CPU essentially treated me with the passive aggression of a woman scorned, slowing to a state (too) similiar to my laptop.

~My i7's Mood Before~
Happy To Serve


 ~My i7's Mood After~

Do these eyes still say "Happy?"

Procrastination when told to turn on.
Her head in the cloud when asked to retrieve things from the Cloud.
Feigned sickness when showing video.
Such were the tactics of her protest.

The message was clear: So long as she didn't have her helper to fetch display information, she wasn't happy. And if she wasn't happy, I wouldn't be happy.

Thus, in surrender to her strike, this morning I summoned the will to bring my old card out of retirement. The pouting, unsurprisingly, immediately ceased upon installation.


~My Old CPU's Old Companion to the Rescue~

Smaller Doggie, but Still Loyal Doggie means...

 =  

...a Happy CPU Again!


The Moral: It's advisable that give your CPU a GPU to keep them company. Even if its cheap and obsolete.  Even if you do not play games. It does indeed make a difference in bottomline performance.

Yes, even when all we ask is to simply render some cat videos.channel some basic Youtube videos.

So the next morning I finally summoned the will to bring my old graphics card out of retirement to keep her company. Suddenly, my CPU is happy again.

Monday, January 20, 2014

Installing Your (Android) Code Software on Windows 8.1 - Part II

After you have your environment set up for Eclipse, Java, and Maven in this manner, you'll need to install Android drivers to your Windows environment if you actually want to test your apps with your phone. The general instructions on how to do under these web pages:

http://developer.android.com/tools/device.html
http://developer.android.com/tools/extras/oem-usb.html

Unfortunately for yours truly, I hit a snag about here. My android is of the HTC sort, and HTC has not released proper drivers to support Windows 8.1.

After a number of finagling, I finally found the solution to this, and felt like keeping it here for posterity.

As of this writing, if one is testing with an HTC, follow the directions here for steps on how to do so with Windows 8. Otherwise, the HTC Sync Manger should enable you to work.

~Happy Coding~

Installing Your (Android) Code Software on Windows 8.1 - Part I

One of the first things one needs to start coding for android is a IDE and a android device.

Getting my android development environment reset up motivates me to write about it here, on how to set up your environment when working on Windows 8.1.

After downloading and installing the initial Eclipse IDE and Java SDK and JRE, ensure that your PATH is set correctly.  This can be done by....

  1. Right Clicking the Start Button.
  2. Click on System
  3. Go to Advanced system settings (look to the left-hand side of this screen)
  4. Go to environment variables.
  5. Ensure that something along the lines of your JRE is added to the path. For example: C:\Program Files (x86)\Java\jre7\bin;

While you are at it, if you want to install Maven, be sure to also add something along this with it:

C:\Users\[YOUR USER NAME]\[KEEP GOING TO WHERE YOU PUT YOUR MAVEN STUFF]\Maven\bin;%PATH%

The total line should look like this:

C:\Program Files (x86)\Java\jre7\bin;C:\Users\[YOUR USER NAME]\[KEEP GOING TO WHERE YOU PUT YOUR MAVEN STUFF]\Maven\bin;%PATH%


~Continued with Part II~

Monday, January 13, 2014

Chronicles of a PC Parts Shopper - Introduction

Hello again bloggers! In the updating hiatus, this author has gained many insights into the world of computing and programming. Extremely exciting understandings of UML, Analysis, Testing Principles, Design Patterns, and more! It's sometimes difficult to find time to bring all back here, but this New Year of 2014, your author intends to do just that!

On that note, lets talk about something other than pure coding:

Hardware.

Yes we're talking about how to build your own computer.

For yours truly it was simple enough. As a gaming enthusiast, one of my favorites is the Elder Scrolls V: Skyrim. Not only for the gameplay itself mind you, but for the ability to create your own spin on it via its excellent mod community and tools. Let me tell you, such a hobby will teach you a thing or two about testing discipline, watching out for inter-dependencies, and having a clear plan and backlog to discipline yourself with; a crucial aspect of system design once one graduates to the level of incorporating formal patterns and engineering concepts into their software.

But I digress.

I've never been much of a hardware kind of guy; I learned how to install a graphics card two years ago and that was it. Yet the need to continuously test eventually won me over into doing my research into the matter.  My, the things I have learned!

Where to begin this chronicle? As with any project, perhaps it best by dividing things into manageable chunks first, and working on it from there.

Between so I hope to share what I've also learned of advanced code concepts; ultimately reaching the point where I may present videos on a variety of different topics. Such is the sky to which this blog aims for. In time perhaps.

For now, let this post be our prospective preview into the Chronicles of a PC Parts Shopper.

Chronicles of a PC Parts Shopper

Where I Was With My Computing 
The First Graphics Card
Research Sites Best Found
Two Years Later - The Need to Expand
The Second Graphics Card
Attitudes to Take in CPU Shopping
Priorities Part I- The Foundation: Case and Power Supply
Priorities Part II- The Structure: Motherboard and CPU.
Priorities Part III - The Storage: RAM, HDD, SSD, and SSHDs?
Priorities Part IV - The Furniture: Operating System and Video Card

~David Noble Morris~

Growing a PC is like Growing a Plant, or a Slow Cooked Meal. So Enjoy the Journey and Take Pictures.

Where I Was With My Computing

In 2011, I would be the surprised windfall recipient of my very first PC, an HP Pavillion p7. A relative purchased it originally as a replacement to his dying old computer from late 2004, but grew unsatisfied by it due to it lacking a TV Turner as his old machine had. Since I'd been victim to the recent death of my laptop (twas killed by a power surge), rather than send it back, he decided to ship it my way as a psuedo-holiday present and get himself a fancy laptop instead.

Truthfully, he remarked, laptops are all the power a typical, non-power user such as himself needs these days. A good point. For an aspiring developer such as myself though, it represented a wonderful opportunity to learn, .


So would begin my exciting entry into the land of PCs. As my only experience had been with laptops for college and work related reasons, among the first things I was curious about was what was meant by "PC Gaming," as my work-laptop experience never allowed me to really understand what all the fuss was about concerning this computing function.

So I tried installing a game demo that my old laptop couldn't really play.

To my unimpressed chagrin, this new PC couldn't really play a game either, as it was designed as a workstation. To allow it to play games, I'd need to install that which is known...as a graphics card?

More on that later, but for now I'd just like to say this.

If you are thinking of getting your very first PC, one often asks if they should buy one, or build one themselves.


In my opinion, I'm now an advocate for simply buying your first computer, complete and assembled, and concentrate on how to handle a single upgrade, such as how to install a graphics card or TV Tuner without overwhelming yourself. Its a confidence builder to know you taught yourself how to do at least that much

So at least, it will go for this person's story.

Next - The First Graphics Card