Thought and Freedom

Articles for those who think. By Terry Pearson

Archive for the ‘Programming’ Category

Hiring the best programmers

with one comment

In case you are in the market for hiring programmers, or you are a programmer looking to improve your resume (a.k.a. cv), you will benefit greatly from reading Inter-sections.net’s article on finding good programmers.

I have included their bullet points below, but for more details, check out the whole article. It was written well, and contains a lot of good advice.

Positive indicators:

  • Passionate about technology
  • Programs as a hobby
  • Will talk your ear off on a technical subject if encouraged
  • Significant (and often numerous) personal side-projects over the years
  • Learns new technologies on his/her own
  • Opinionated about which technologies are better for various usages
  • Very uncomfortable about the idea of working with a technology he doesn’t believe to be “right”
  • Clearly smart, can have great conversations on a variety of topics
  • Started programming long before university/work
  • Has some hidden “icebergs”, large personal projects under the CV radar
  • Knowledge of a large variety of unrelated technologies (may not be on CV)

Negative indicators:

  • Programming is a day job
  • Don’t really want to “talk shop”, even when encouraged to
  • Learns new technologies in company-sponsored courses
  • Happy to work with whatever technology you’ve picked, “all technologies are good”
  • Doesn’t seem too smart
  • Started programming at university
  • All programming experience is on the CV
  • Focused mainly on one or two technology stacks (e.g. everything to do with developing a java application), with no experience outside of it

Written by Terry Pearson

January 11th, 2008 at 10:15 pm

Posted in Programming

Google To Launch Open Social API

with one comment

MySpace for DummiesSome great news broke today. MySpace will utilize Google’s new Social Network API, OpenSocial.

According to TechCrunch, the APIs allow applications to run on multiple social networks and use standard web development tools like html, javascript, and flash.

Using the API, you can access Profile Information, Friends Information, and Activities (i.e. profile changes).

These APIs will be incredibly useful for those who have their own website. It finally allows us to realize the goal of a “Social” web environment.

For those looking to get extra help with the APIs, there are already sites being created to help developers build websites based on OpenSocial standards. One such site is OpenSocialStuff.com.

Written by Terry Pearson

November 1st, 2007 at 9:16 pm

Posted in Internet,Programming

Java Interview Questions

with 7 comments

Computer science students learn about a wide range of topics during their time at school. There are several things a programming student should know regarding Java. There is a great review for Java programmers found at http://www.interview-questions-java.com/. These are questions and answers to many Java interview questions. It is also a good refresher for those experienced in the Java language.

read more | digg story

Written by Terry Pearson

May 11th, 2007 at 11:10 pm

Posted in Java

Graphical Web Search Engine

without comments

Photo sharing site Riya.com has pioneered new technologies in graphical search engine technology. Using highly advanced facial recognition, they are able to auto detect faces from within your online photo album.

It works through a training program. This is not unlike other similar technologies such as speech recognition. It requires several pictures of a person to be “identified” and then it can begin to “find” the person in other pictures.

Overall, the algorithms involved in such a search can be highly complex. This is a much higher complexity than fingerprint analysis. In fingerprint analysis, a program can map points where ridges split or join, and then calculate a distance and direction between each. When recognizing a fingerprint match, it simply checks for a proportional picture of these points. If it is basically the same, the software identifies a match. If not, the print is rejected.

Facial recognition is vastly more complicated. For more details on facial recognition algorithms, check out face-rec.org’s page on facial recognition algorithms. There are several algorithms that can be used. An algorithm that I thought sounded “easier” was the Elastic Bunch Graph Matching Algorithm. It uses a graph and vectors to map the face based on fiducial points (such as noses, eyes, etc.).

By the way, Riya.com is currently giving away unlimited space to store your photos and has an automatic upload tool for your My Pictures folder on your computer. It is worth your time just for that. I found the web interface easy and intuitive, and overall, I am quite satisfied with the site.

Written by Terry Pearson

April 8th, 2007 at 9:56 pm

Test your Java Skills

without comments

I am currently in a Java class at my university. This is a language that I think is just wonderful. Java (and  .NET languages) truly utilizes Object Orientated Concepts to the fullest.

When you are learning a language, it is sometimes difficult to test your skills. You certainly think you know a lot about the language, but how do you know that you are an expert? Possibly the best way, besides certification, is to take online tests on the language of your choice.

A great place to look for these online tests is on text book publisher websites. For example, my textbook entitled “Introduction to Java Programming” by Daniel Liang, has a website with source code and tests available to all. This tool makes it very easy to assess your current skill set, and helps identify areas in which you need to improve.

Written by Terry Pearson

April 4th, 2007 at 6:41 pm

Things to Know Before You Graduate – For Computer Science Majors

with 2 comments

As a computer science major, there are many things you should know before you graduate. To land a job, it is important that you have a broad base of knowledge when it comes to computer science. Below, I have compiled a list of some key things to know before you graduate.

By the way, these are mainly from questions that were asked during my interview with Avanade last week.

  • SQL Transaction
    • The combination of several SQL statements into one atomic group. It allows for an all or nothing approach.
  • SQL User Defined Functions
    • Functions that are run on the SQL server that are created by the user of the DBMS.
  • SQL View
    • A view appears like any database table, and can be operated on just like any table, but is actually a portion of a database table.
    • CREATE VIEW myview AS
    • SELECT name, age
    • FROM students
    • WHERE age = 5
  • Definition of Inner Join
    • A join of two tables that returns records for which there is a matching value in the field on which the tables are joined.
  • Definition of Outer Join
    • A table join in which rows from one table are included in the result set, even if they don’t contain values that match those in the other table.
  • Normalization
    • Decreases the amount of data
    • Decreases the load on the server and can increase performance
    • Going beyond 1NF can introduce logic errors when inserting/updating/deleting records
  • Acid Properties
    • In databases, ACID stands for Atomicity, Consistency, Isolation, and Durability. They are considered to be the key transaction processing features of a database management system, or DBMS. Without them, the integrity of the database cannot be guaranteed.
  • Linked Lists vs. Arrays
    • Duh! Just think inserts, deletes, and sorting and the complexity involved in these transactions
  • Interface
    • An interface is a description of a set of methods that conforming implementing classes must have.
    • Only non static methods and static final variables can be defined in the interface.
  • Abstract Classes
    • A class in which some of the functions are not implemented.
  • Characteristics of Object Orientated Programming
    • Inheritance
    • Encapsulation
    • Abstraction
    • Polymorphism
  • Access Modifiers
    • Public – Visible to all classes
    • Protected – Visible to the class they belong to and to any sub-classes
    • Private – Visible to the class they belong to
  • Software Development Methodologies
    • In the traditional waterfall methodology, first comes the analysis phase, then the design phase, followed by the implementation phase, with testing completing the process. The team that does each phase is different and there may be a management decision point at each phase transition. This methodology is called the waterfall methodology because each phase flows naturally into the next phase like water over a series of falls.
    • The spiral methodology fixes some of the problems introduced by the waterfall methodology. The spiral methodology still has the four phases. A little time is initially spent in each phase followed by several iterations over all four phases.
  • Sorting Algorithms
    • Bubble Sort
      • The array of values to be sorted is divided into two partitions: the partition of sorted values and that of unsorted values.
      • In each step of bubble sort, the smallest element found so far in the unsorted partition moves up, and it is appended to the end of the sorted partition.
      • The sorting proceeds until the elements in the unsorted partition are exhausted.
    • Selection Sort
      • The selection sort works by selecting the smallest unsorted item remaining in the list, and then swapping it with the item in the next position to be filled. The selection sort has a complexity of O(n2).
      • You have a Floor variable (which identifies the index of your first unsorted position in your array, and you have a minimum index variable that will point to whichever position is lowest so far. Once the remaining portion of the array is looked at, the floor variable and the minimum index variable are swapped.

Written by Terry Pearson

April 2nd, 2007 at 10:44 pm

Instantiating a CFC

without comments

Coldfusion has certainly progressed over the years. As it moves closer to object orientated design, it also becomes more complicated.

One important part of Coldfusion web development for me is the CFC. A CFC is a Coldfusion Component. Essentially similar to a class, the CFC provides a mechanism to store and reuse code. It also, when used properly, facilitates a much more efficient product life cycle.

We have been using CFCs at my work for about a year now, and they are a big hit!  If you are familiar with Coldfusion, you may know that there is more than one way to use a CFC. You can either invoke a function from a CFC using a <cfinvoke> tag, or you can instantiate a CFC for use across a session or application scope.

Though more complicated, instantiation allows for better use of the processing power of your server. This is especially true if you invoke a CFC multiple times throughout the course of a page.

For more on this topic, check out Adobe Livedocs.

Written by Terry Pearson

March 18th, 2007 at 10:11 pm

Posted in Coldfusion

Learning about Applets

without comments

Web programming can be as simple or as complex as you want it to be. The easiest web publication is a simple text file. You could upload it to the web and it would show up as just text.

From the text file, you could progress to a simple HTML file. This is basically a specially formatted text file.

As complexity increases, so do your options and features. Languages like Coldfusion add another layer to the complexity. But, they open the door to many more uses. PHP would probably come slightly after Coldfusion.

Eventually you come to a category called “Applets.” I am sure you have heard of them, but they can be seen as mysterious in nature. They are Java Programs that are compiled and all, and told to run within the confines of a web browser.

Applets are just past the edge of the “scripting universe.” In a way, they are the bridge between compiled code and scripts. They themselves are compiled, but closely relate to their scripted environment.

Learning how to program applets can be rewarding and can extend the usefulness of your website. My advice is to start by going to WebChalkboard’s lessons on applets. They are concise and to the point and will get you started in no time.

After you go through the initial tutorials on WebChalkboard, go over to Sun’s own applet tutorials. Sun’s tutorials will show you how to use pictures, sounds and more. It will take your applet building to the professional realm.

Once you know the basics, applets can be a fun way to create an interactive and informative website!

Written by Terry Pearson

February 3rd, 2007 at 2:46 pm

Display a Double with two decimal places in Java

with 2 comments

I just spent the longest time trying to find the easiest way to make a double display two decimal places in Java.

Basically, I wanted to output money information, and it would look better if the money data says “$5.00″ instead of “$5.0″ as is sometimes the case. There are so many “solutions” to this, that it is difficult to wade through them all.
The best solution I encountered was relatively easy. You can find it in Sun’s Java forums.

import java.text.DecimalFormat;

double d = 8.9909879;

DecimalFormat dFormat = new DecimalFormat(0.00″);

String formattedString = dFormat.format(d));

The above code will format a string that has two decimal point precision. It will give the number 8.99 instead of 8.9909879.

Written by Terry Pearson

January 28th, 2007 at 1:48 am

Caffinated Food???

without comments

It has been said that most programmers and gamers run off of Mt. Dew and Jolt Cola. Caffeine has been an “essential” part of computers since the beginning. Why do you think computer languages are even named after it (Java).

Recently, scientists have discovered a way to insert caffeine into baked foods. They had previously failed due to the bitter taste it produces, but recently succeeded in creating caffeinated food without the bitterness.

So, maybe we will see caffeinated pizza or doughnuts become the  fuel of choice for computer users someday!

Written by Terry Pearson

January 27th, 2007 at 1:39 am


Creative Commons License
Terry Pearson - The Blog by Terry Pearson
is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.