Technical

How To Master a Programming Language V

For my final post of the series How to Master a Programming Language, I want to make note how you can take the programming knowledge that you have gained so far and apply it to something bigger.

Learn a Framework

Now that you have worked through the language and applied it to solving problems, how do you go about solving bigger problems or accomplishing large project? Answer: Use a framework.

If you are unfamiliar with frameworks, they allow you extend the API of your language beyond the base software library. All frameworks are not created equal, a given language may have several frameworks available – each one used for solving a different problem.

Java

C#/VB.NET

PHP

Ruby

Python


Start a Project For Yourself

You will only start to appreciate a programming language and its framework when you start working with it to create something of value.

If you already have an idea in mind – great! Run with this idea and start using the tools that you have learned.

If you are stuck trying to figure out a potential project – talk to people. People always speak of ideas, but few people actually follow up. Identify phrases such as “I wish there was…”:

  • “… a website that would do this…”
  • “… an easier way of doing this…”

Still stuck? Here is a list of resources to help you in the right direction:

I am always looking for suggestions from my readers. If there are any frameworks or programming project websites that I should add, please feel free to share.

2

How To Master a Programming Language IV

At this point you should competent in the programming language that you have chosen (Part III) — you should be able to recognize basic code constructs (such as types, loops, and variable assignment). You should also be able to recognize syntax and semantic errors in your code and be able to debug them.

The next step to mastering a programming language involves “flexing your code muscle.” What I mean by that is to start using the knowledge you have acquired through reading books and tutorials and apply it to solve problems.

Flexing Your Code Muscle

Basic Exercises

I came across a website a while ago that lists 15 Exercises for Learning a new Programming Language by Prashant N Mhatre.

The purpose of these exercises is to learn how to perform basic mathematical and commonly used code procedures in your language of choice.

Topics Covered by 15 Exercises

  • Program Interruption
  • Mathematical Problem Solving
  • Sorting a list
  • If Statements
  • Loop Mechanisms
  • Exception Handling
  • Input and Output
  • File Operations
  • Date Operations
  • String Searching and Replacement
  • Inserting into List
  • Language specific operations

Most of these topics can be applied to mostly any 4th generation programming language.

Problem Solving

I have previously listed several websites with programming puzzles to allow practice your skills: Get Hired By Solving Programming Puzzles.

Out of all the sites with programming puzzles, I would have to recommend Project Euler.

There are over 270 problems (as of 1/15/2009) with new problems being added every month. The problems found on Project Euler are geared towards students and are not meant to be too extensive. The problems can be solved using any programming language.

Setup an account with Project Euler and start solving problems. If you are finding the problems too difficult, Project Euler has the option to sort the problems in ascending difficulty.

If you continue to have difficulty, read about the mathematical concept you are solving for (e.g. Fibonacci, Greatest Common Divisor, etc.) on a site like wikipedia and think about how you would solve the problem without a computer. Then think about how you would apply that technique using a programming language.

Practice, Practice, Practice

“Practice isn’t the thing you do once you’re good. It’s the thing you do that makes you good.” – Malcolm Gladwell

This post is all about practice, which is also the mantra of this blog. If you want to become a master at programming, this is one step that you cannot leave out.

How do you practice using your programming skills?

1

How To Master a Programming Language III

Now that you are comfortable working within your desired editor or IDE (Part II) – you can start to focus on learning the programming language syntax.

To learn a programming language you can read a variety of different books or read through online tutorials and how-to’s. Since everyone approaches learning differently, I will leave the decision up to you.

Programming Books

If you learn best by reading a book, I suggest choosing a tutorial book that walks you through learning the language rather than a reference book (at first).

A tutorial books is the better choice because it can be read cover-to-cover and it encourages the reader to work through problems, examples and case studies.

I am a big fan of the Deitel & Deitel books for this reason.

C++ How to Program

Paul J. Deitel and Harvey M. Deitel

Visual C# 2008 How to Program

Paul J. Deitel

Java How to Program

Paul J. Deitel and Harvey M. Deitel

I’ve also mentioned before that I am also recommend the Head First series of books because they teach programming concepts in a practical way without technical jargon.

Head First HTML with CSS & XHTML

Elisabeth Freeman and Eric Freeman

Head First PHP & MySQL

Lynn Beighley and Michael Morrison

You can also find free e-books (in pdf format) that teach programming languages. I recommend How to Think Like a Computer Scientist by Allen B. Downey for learning the Python language.

Programming Tutorials and How-To’s

If you learn better by online tutorial or if you want to supplement your books – there are many websites that offer programming language tutorials.

Again, I recommend finding an online tutorial that walks you through learning the syntax of the language.

List of Tutorials

A Grasp of the Language

After you have read through a book or tutorial, you should have a good grasp of the language syntax – but you are far from being a master of the language at this point.

Keep in mind that you don’t need to memorize every little detail about the language, but you should be familiar. You should know how to reference the language API, a useful reference is gotAPI.com which has a comprehensive listing of many programming languages.

If you know of any good tutorial websites or books, please share in the comments.

4

How To Master a Programming Language II

So you’ve chosen a programming language that you want to learn, where do you start?

Learn the Environment

Depending on the type of language that you have chosen (interpreted vs. compiled) there may be several options available to you in choosing an editor or Integrated Development Environment (IDE).

Editors

Most programming languages can be written in your editor of choice. The preferred editor will include at a minimum syntax highlighting.

Some Text Editors Supporting Syntax Highlighting

Integrated Development Environment

If you want a full-featured editor, you may consider choosing an Integrated Development Environment (IDE). IDEs will provide an interactive debugger, advanced syntax checking, integration with software configuration management (SCM) systems, etc. Sometimes learning all the features of the IDE is just a big of a task as learning a language.

Some Integrated Development Environments

Resolve Dependencies

Depending on the language you are learning, there may be additional dependencies that your development environment requires. Whether you are using an IDE or text editor you need to have the language interpreter or compiler installed (or else you won’t get very far).

Also, if you are developing web applications, you will need to have a web server or web application server installed and configured.

Most IDEs will resolve these dependencies for you – however, you may also consider using a all-in-one local server environment.

Basic Programming Tasks

After your programming environment is setup correctly (you may need to make some additional tweaks along the way), work through a “Hello World!” problem in the language of your choice. Make sure you can do the following:

  • Check for Errors in Syntax
  • Compile via GUI and Command Line (if your language supports this)
  • Run your Program

At this point you should have basic command of your environment. As you work with it and get deeper into your language, you will become more familiar with the different features and options available to you.

2

How To Master a Programming Language

With the start of a new year, as a programmer have you made a resolution or goal to learn a new programming language?

For the next few days, I will be writing a series of posts titled How to Master a Programming Language, where I will be walking you through the steps that you need to take to learn the ins and outs of a programming language.

If you really want to master a new programming language, you have to do more than just read these posts — you need to take action!

Think about what you have done previously when learning a language. Is there anything you have done differently that has helped you learn a language? Please feel free to share your experiences in the comments.

Read the series of posts here:

5

9 Useful Websites for Thematic Child Theme Development

You’ve may have noticed a design change here at RepeatGeek, if you’ve visited before. I have been exploring different WordPress frameworks to build my website around and I finally decided upon Thematic.

My decision to go with Thematic was that it is extensible, stable, SEO optimized, easily configurable and most importantly FREE.

In developing my child theme, I thought I would share some resources that I found useful.


A Guide to Thematic – ThemeShaper

AGuideToThematic

This is a wiki from the Thematic creator Ian Stewart that seems a little incomplete, but does contain some useful code snippets.


The Old Busted Guide – ThemeShaper

CustomThemeFramework

Before there was the wiki there was the old busted guide. This is still useful because it contains some examples not found in the wiki. Until these are moved over to the wiki, the old busted guide will remain relevant.


How To Create a WordPress Theme: The Ultimate WordPress Theme Tutorial – ThemeShaper

UltimateWordPressTheme
Also from the creator of the Thematic theme is an 11 part tutorial that walks you through the creation of a child theme.


Thematic Page Structure – Blue Mandala

ThematicPageStructure

This diagram outlines most of the areas of thematic that you can customize and style. You will want to print this one out.


Build a WordPress theme with Thematic – Wynn Netherland

BuildWordPressThematic

Wynn Netherland put together a good tutorial to get you started with setting up your WordPress environment with Thematic.


Useful Thematic Filters – WordPress Theming

ThematicFilters

A collection of several useful code snippets for adding filters and actions within Thematic.


How to Create Your Own WordPress Theme in Just 3 Hours – Matteo Stagi

WordpressTheme3Hours

Matteo Stagi has a multi-part tutorial that walks you through the customization of a Thematic WordPress child theme from scratch.


So You Want To Create WordPress Themes Huh? – Spicy Web Design

SpicyTheme

The Spicy Chef has an 11 part (10 Official parts and 1 Unofficial part) tutorial on creating a Thematic child theme from scratch.


ThemeShaper Forums – ThemeShaper

ThemeShaperForums

If all of your questions cannot be answered via tutorials and websites I listed above, there is always the free support forums at ThemeShaper.


0
Is Troubleshooting an Art or Science?

Is Troubleshooting an Art or Science?

“What do I always say? Anyone can cook.”

I am often reminded of this quote from Disney Pixar’s Ratatouille when I think about troubleshooting. But is it true that anyone can troubleshoot computer problems or debug code?

The Troubleshooting Process

Much like cooking, troubleshooting follows a simple recipe that anyone can follow. Troubleshooting can be broken down into 4 steps:

  1. What are the symptoms?
  2. Can the problem be reproduced?
  3. What changed since the last time the system worked?
  4. Find a solution to the problem.

1. What are the symptoms?

This step will usually be completed by the end users of your application – their complaint will be the catalyst in starting the troubleshooting process. You want to identify any symptoms that are occurring, to help narrow down the problem:

  • Is the application crashing?
  • Are you receiving an error message?
  • Are you getting unexpected results?

2. Can the problem be reproduced?

Sometimes an error can be a one-time occurrence (these can be a little bit more difficult to troubleshoot) – such as a connection to an external database is not available temporarily, but after waiting an unspecified amount of time the system works correctly.  Sporadic errors are more difficult to troubleshoot as there might be several things wrong (at the same time) and may require a problem process of elimination.

For other issues, you want to identify a predictable pattern to the error occurring. For example, if I enter a zero into this field and press calculate, I receive a divide by zero error message.

3. What changed since the last time the system worked?

A program should never change its behavior on its own (unless you are programming A.I.). Something must have changed somewhere in the system, it could be code related, hardware related, operating system related, etc. The change may resulted from something that was done unintentionally, such as Windows installing automatic updates or malicious code.

Many applications and operating systems will have logs that will identify any that may have happened, these will be your primary source for determining changes.

4. Find a solution to the problem.

This is the step where troubleshooting becomes more of an art.

Steps 1 – 3 are really a discovery process – the answers can usually be obtained by asking end users some basic questions.

Occasionally, the solution to a problem is a relatively simple fix and the troubleshooting process ends here. If the solution is not inherent after the discovery process, research needs to occur.

The difficulty lies in knowing where to look. This, unfortunately, is something that will only come with experience. One of the first things that new programmers confront is, “how do I know what data types are available or which one to use?” If you look at it, different variations of this question can be used no matter what profession you have:

Chef: “How do I know what ingredient to use?”

Doctor: “How do I know what to prescribe for those symptoms?”

Baseball Player: “How do I know how to swing the bat for the most impact?”

After you’ve tried a solution, did you fix the problem? Troubleshooting may become a recursive process – because you may inadvertently introduce new errors and will need start the troubleshooting process again finding a solution to the new problem.

The good news is there are plenty of resources (see 17 Websites for Sharing Programming Knowledge) where we can seek out expert advice and find answers to our questions.

Experience is what sets apart the beginners and the masters.

Whether it’s cooking or troubleshooting, anyone can do it – However, each person will have varying degrees of success depending on the experience level.

Photo courtesy of http://www.flickr.com/photos/kiaura/ / CC BY 2.0

1
17 Websites for Sharing Programming Knowledge

17 Websites for Sharing Programming Knowledge

Whether you are trying to drive traffic to your own blog or are looking for assistance when developing – it’s sometimes useful to participate in programming forums and blogs by sharing knowledge.

I’ve compiled a list of 17 websites where you can share your own knowledge or search for help on a problem.

Apple

Apple Discussions – Developer Forum

AppleDiscussions

Apple Discussions are a resource for everything Apple: iPhone, OS X, Hardware, etc. One of the categories is the Developer Forum, which is a resource for developers using the Apple OS X platform.


Java

Sun Forums

SunForum

The Sun Forums are a resource for Java developers and other Sun software and hardware. Some of the Java topics covered:

  • Java Essentials
  • Core
  • Database Connectivity
  • Desktop
  • Developer Tools
  • Security
  • Java HotSpot Virtual Machine
  • Enterprise & Remote Computing
  • Real-Time
  • Java Mobility

Microsoft

ASP.NET Forums

ASPNET

The ASP.NET forums is a resource for those developing web applications in Microsoft ASP.NET. Some of the topics covered:

  • General ASP.NET
  • ASP.NET AJAX
  • Visual Studio
  • Data Access
  • Advanced ASP.NET
  • Migration to ASP.NET
  • Starter Kits and Source Projects
  • Microsoft Downloads
  • Development Tools
  • Windows Hosting
  • Community
  • .NET Languages

IIS Forums

IIS

The IIS forums are a resource for those developing on the Microsoft Windows Server platform. Some of the topics covered:

  • IIS 5.x & 6.0
  • IIS 7
  • 64-bit Editions of IIS
  • General

MSDN Forums

MSDN

The MSDN forums are a great addition to the MSDN Library, for those developing in .NET. Some of the topics covered:

  • .NET Development
  • Visual Studio
  • Visual Studio Express Editions
  • Visual Studio Team System
  • Visual Basic
  • Visual C#
  • Visual C++
  • Visual J#
  • Visual FoxPro

PHP

PHP Developers Network

PHPDev

The DevNetwork forums are a resource for those developing in PHP. Some of the topics covered:

  • General
  • Programming
  • Design
  • System
  • Business

Ruby on Rails

Ruby Forum

RubyForum

The Ruby forum is a collection of forums related to the Ruby language and the Rails framework. Some of the forum topics:

  • Ruby
  • Ruby Core
  • JRuby
  • IronRuby
  • Rails
  • Rails Deployment
  • Rails I18N
  • Rails Engines
  • Rails Core (r/o)

Rails Forum

RailsForum

The Rails Forum is for those developing in Ruby on Rails. Some of the topics covered:

  • Starting Out
  • Planning
  • Programming Rails
  • Extending Rails
  • Production
  • Web Development

Python

Python Forum

PythonForum

The Python Forum is a resource for those developing in Python. Some of the topics covered:

  • Python Coding
  • Forum Activities: Contests & Challenges

Perl

Perl Guru

PerlGuru

The Perl Guru forums is a resource for those developing in Perl. Some of the topics covered:

  • Perl Programming Help
  • Fun with Perl
  • Custom Perl Written Program Requests

General – Web Development & Design

Coding Forums

CodingForums

CodingForums is a resource for those developing in a variety of web technologies. Some of the topics covered:

  • Client-Side Development
  • Server-Side Development
  • Computing and Sciences
  • Web Projects and Services Marketplace

Web Design Forum

WebDevForums

Web Design Forum is a resource for both web developers and web designers. Some of the topics covered:

  • Web Design
  • Graphic Design
  • Scripting Languages
  • SEO
  • Marketing
  • Hosting
  • Business

General – Various

Code Guru

CodeGuru

CodeGuru Forums are a resource for all types of developers. Some of the topics covered:

  • Visual C++ and C++ Programming
  • Visual Basic Programming
  • .NET Programming
  • Java Programming
  • Other Programming: AJAX, Scripting, Database, XML

DZone

Dzone

DZone is a link sharing community specifically for developers. Developers can submit, share, vote and comment on links.

Proggit (Reddit Programming Subreddit)

Proggit

Reddit is a link sharing community, where users can submit, share, vote and comments on links. Reddit Programming is a category of Reddit specifically for links related programming.

Stack Overflow

StackOverflow

Stack Overflow is a Q&A site for programmers. Users can ask questions related to any programming language and submit answers, vote and comment.

Tech Republic

TechRepublic

TechRepublic is a community site for IT professionals containing blogs, forums, white papers, videos, photos, etc. All topics related to IT are covered in one of the above formats.


Please share any programming forums or blogs that you frequently visit in the comments.

13

How to Get Started with iPhone Development

There does still appear to be a market for making money with iPhone apps (especially games), if you are still interested in creating an iPhone application there are plenty of resources available to help you along the way.

Prerequisite: You will need an Intel-based Mac with XCode for iPhone development.

When the iPhone development tools were initially released Apple had implemented a Non-Disclosure Agreement (NDA) that pretty much limited the amount of information that was available to developers in terms of sample code or tutorials. Apple has since removed the NDA and now there are plenty of resources available online, in books and classes. The resources that I provide below will allow you to develop iPhone applications that you can sell in the iTunes App Store, there are other resources online that I do not cover that will teach you how to develop applications for Jailbroken iPhones.


OS X Development Resources

If you are completely new to developing on a Mac, I would recommend the following books to get started:

Cocoa Programming for Mac OS X

Aaron Hillegass

This book primarily focuses OS X application development rather than iPhone development, but its is a good introduction to using XCode, Interface Builder and Instruments.

Programming in Objective-C 2.0

Stephan Kochan

Programming in Objective-C will introduce you the Objective-C programming language required for iPhone development. Most of the examples in this book are demonstrated using a Mac; however, Objective-C can be developed in Windows, Unix or Linux using gcc or a tool like MinGW.


iPhone Development Resources

Since Apple removed the NDA, there have been several books authored that contain tutorials and sample code for developing your own iPhone applications.

Beginning iPhone 3 Development: Exploring the iPhone SDK

Dave Mark & Jeff LaMarche

This book has many walkthroughs and tutorials to accomplish basic iPhone development tasks. You can move more quickly through this book if you are already familiar with the Xcode/Interface Builder environments (See Hillegass).

The iPhone Developer’s Cookbook: Building Applications with the iPhone 3.0 SDK

Erica Sadun

Containing many code samples, the iPhone Developer’s Cookbook is a good reference for quickly finding how to perform common iPhone development tasks.


Free Online Tutorials

Stanford University started offering a course on iPhone Application Programming and has made the course materials available online for free. As of early this month, you can download podcast lectures from the Standford University iTunes Store.

This course is one of the best resources available right now, it will get you ramped up quickly even if you have never developed on a Mac before.

If you have come across any good books or online tutorials, please feel free to share.

Update: Taranfx offers 5 ways to develop iPhone apps on Windows.

Update: Useful tutorial for building iOS applications from scratch.

0