Monday, March 23, 2015

The First Graphics Card

I like many people, would think installing a graphics card would be difficult.

Lets clear away some misconceptions I had about graphics cards that I learned from buying one.

  1. Yes, you really need a card to play games
    • Many of the features list on a PC like buzzwords to make their PC sound more powerful than it really it. Take my case: My computer featured a stellar HD Radeon 4200 integrated graphics!

      "Oh," I thought. "I bet it can play games better than my old lappy.!"

      But all integrated graphics means its that the motherboard itself does graphical work for stuff like playing a movie or web browsing. To play the video games of a console, a part akin to a console is necessary.
  2. Graphics "card" is a bit of a misnomor
    • With computing getting smaller and smaller these days, I never understood why they say you can't upgrade the cards on a laptop. I didn't understood what a graphics card looked like, but when I think "card" I think something that fits in my wallet.

      Boy oh boy was I surprised when my first card showed up.

      [pic of box] [pic of card]

      You see, when one thinks of a graphics card, one should properly visualize something more akin to say...a license plate. That is why for Home Theater Purposes, PCs will always be what you need, even as mobile computing becomes more and more convenient for regular needs and business work.
  3. Hooking up a graphics card is no real different than hooking up a VCR
    • Remember that very first awkward, terrifying moment when you had to hook up a TV or a VCR for the very first time? How you thought "What if I mess something up?!"

      When it comes to the concept of computer upgrades, most people, which included myself, have the apprehension that opening their computer for any reason is bound to break...something! But then you discover that the cables are designed so that it's actually not possible to mess it up, as the cables are thankfully shaped in a manner where its simply a matter of Lego blocks.
  4. With great power comes the need for power
    • It was a really good deal at the time my father bought this computer. I had it appraised for the potential for upgrading from a Geek Squad associate to confirm it was scalable.

      He affirmed for me that it was indeed an excellent base to make a gaming computer at the time, and wondered how they managed to get the price so affordable.So he popped it open to appraise it. And confirmed a suspicion he had.

      They way they did so was to go cheap on the Power Supply. Or PSU. Its the job of a PSU to take Volts from a wall outlet and convert it into the Watts that an appliance needs. Without enough watts, it seems you really could break a system (fortunately, if your PSU isn't up to snuff, it normally doesn't come with enough connectors and stuff however).

      So just be prepared to check if you have enough power to go with your gizmo. Short on cash at the time, I bought an inexpensive 500 Watt Power Supply to take care of things.
  5. Surprisingly Inexpensive Options
    • At the time, I was inbetween jobs and scrapped for cash. I will never forget how I was able to find my card, which was then amongst the top twenty money could buy, at only $180. To me, someone who was working multiple part-time jobs and temp work, was so low that even I could afford it. Based on your budget, there truly are some inexpensive options out there!

      For the next two years my Sapphire would keep me happily gaming on Very High settings. Absolutely beatiful details. So it was later on, for very specific reasons I would develop later, that I would come to wish to have a new high performance system itself. As having shopped, I'd like to advocate that once you start building, beware the temptations of power lust. Gaming need note break the bank. As I would later journey into the world of building a full spectrum.


Java Beans and Serialization

A java bean encapsulates the scripting for setting and getting information from a database. You make them Serializable (aka, savable). They help you manage rows of data to update and delete as you adapt your management class to various data structures. Beans are rather simple to correct and modify.

Videos that demonstrate the concept can be shown here.

<iframe width="560" height="315" src="https://www.youtube.com/embed/eMMLaneVkjc" frameborder="0" allowfullscreen></iframe>

JavaBeans are among the prime features of frameworks such as Apache Spring or Java Database Connectivity (JDBC).  An extension of Factory Patterns, they help free developers from relying on too many class dependencies by encapsulating the code that creates objects. This greatly assists maintenance, as per the Dependency Inversion Principle.



Dependency Inversion Principle - depend on abstractions, not concrete classes.

To speak more of Serialization, the concept here is to safe the instance variables (aka the "state") of your class objects to a FileOutputStream (foo for short). Such methods are risky, so you may want to put them into a try-catch block.
If there is an instance variable you don't want saved, mark it as transient.  Among the conveniences of Serialization is that the entire object graph is Serialized. That means any object values referenced by the class is also saved.



For example, say you have a Car Class and it references classes for Engines and Wheels. What you have with these various pointers within the Car Class is a graph, and Serialize will save all this for you.



Serialization can be more convenient then other paradigms for saving information (such as a Comma Separated Value document), but Serialization is limited to Java Applications only. If such information must be cross compatible among programming languages, you wish need to use a FileWriter to save a String that contains the information you wish to save.


~Code Crunch Corner~

Udacity

Udacity has very good, colorful introduction videos to concepts that I've found to be generally hard to break into. I've only skimmed the surface thus far, but I'm very impressed by their introduction Machine learning and Big Data. Incredibly impressed in fact; its some of the best learning tutorials I've ever seen, and that's saying a lot considering my regarded experience with Coursera, New Think Tank, Head First, and CodeAcademy.

Each segment is broken into 60 second chunks on average in an delightful manner by instructors who seem happy to explain things. It invokes the feeling of being guided by your awesome, friendly teacher from the 5th grade all over again. You know, the really fun, effective Mary Poppins-like grade school teacher one who made you feel emotionally swell while intellectually improved at the same time. After each chunk you feel like you've earned a gold star, a cookie, and a short nap to relax. :D

It feels conversational as they challenge you to think about problems as you go in a Dora the Explorer type of manner. By breaking things into chunks, they really make the learning feel like a grade-school conversation.

I'm confident even a child could quickly become a coder if first introduced to via Udacity. Tied in my mind only with the Head First book series. Last but not least, they promise that when the training is complete, cake will be served!

Bonus! :D

~Code Crunch Corner~

Coursera

I like Coursera, though my recent experience with one of its courses leaves me feeling a bit mum. It offers some awesome free courses for you to review on a wide variety of topics; "on demand" courses that hold no grading pressure that you can take at your leisure from economics, to cooking classes, and of course, programming.

They also have plenty of (amazingly affordable) certifications "signature tracks" as they call it as premium content; whereas for every 4 week graded course you complete, you get a "mini-certification" (from what I can best tell) called a "Verified Certificate." Collect them all for a particular track and you can declare yourself fully certified with "Specialized Certificate."

However, like all courses, once you enroll, the pacing of a signature course can move too fast for you to keep up. Luckily they have a flexible and full refund policy that's easy and executable at anytime prior to final deadlines. Alternatively you can refund for a voucher instead; redirecting the voucher to another course, or simply to retake a withdrawn course at another time.

Quizzes are graded by staff, and peer based for a final project; you must help with the evaluations or it will affect your grade. Personally I always feel slightly irritated about grading penalties, but at least late submittal by a day or so won't break you. On most things. No, where I feel most choleric is the lack of partial credit on peer evaluations. Due on Sunday at 11:59, I once did three out of the required four evaluations, and then forgot about it until Monday at 2:00 am. Being a hard deadline, my saved peer evaluation work was apparently blocked off and wouldn't count at all, lowering my overall grade by 20%. Luckily, I was still able to receive a certificate, but the frustration of possibly needing to retake a course over this issue greatly bothered me all the same.

I also found the webcam requirement to be plagued with technical "iffy-ness" and unreliable for my desktop PC. It doesn't seem to register all makes and models perfectly, yet they require that you take a picture prior to every submission of your work.

Nonetheless, I still like Coursera and value it as a resource. Overall given that the courses are hosted by different universities and staff, the true quality of a course appears to be dependent on the instructor who is teaching it. I'll continue to dive further into Coursera based on specific impressions of specific courses that I take. But again, I can definitely endorse Coursera overall.

~Code Crunch Corner~

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::