Archive October 2009
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
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
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
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
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
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
The DevNetwork forums are a resource for those developing in PHP. Some of the topics covered:
- General
- Programming
- Design
- System
- Business
Ruby on Rails
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)
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
The Python Forum is a resource for those developing in Python. Some of the topics covered:
- Python Coding
- Forum Activities: Contests & Challenges
Perl
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
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 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
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 is a link sharing community specifically for developers. Developers can submit, share, vote and comment on links.
Proggit (Reddit Programming Subreddit)
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 is a Q&A site for programmers. Users can ask questions related to any programming language and submit answers, vote and comment.
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.
13What Programming Language Should I Learn Next?
I am a big fan of reddit and it is usually my primary source of reading what’s new.
There is a sub-category (sub-reddit) on Reddit for Programming and one question that is posed very frequently is: What programming language should I learn next?
If your purpose for learning a new language is career motivated, I recommend that you start your quest looking at what what top companies are searching for in candidates. Companies such as Microsoft, Google and and Apple will generally seek individuals who have knowledge of the core programming languages such as C, C++, Java and will mix in some of the more cutting-edge technology such such as AJAX or jQuery.
Here are some sample job requirements from Google, Microsoft, Facebook and Apple.
Google - Software Engineer
- BS, MS, or PhD in Computer Science or related technical discipline (or equivalent).
- A solid foundation in computer science, with strong competencies in data structures, algorithms, and software design.
- Extensive programming experience in C/C++ and/or Java (strong OO skills preferred).
- Several years of large systems software design and development experience, with extensive knowledge of Unix/Linux.
- Coding skills in Python or Javascript/AJAX, database design and SQL, and/or knowledge of TCP/IP and network programming are a plus.
Facebook – Front-End Engineer
- A passion for performance debugging and benchmarking Experience building JavaScript/HTML/CSS applications and frameworks
- Experience working with JavaScript/HTML/CSS in high-performance environments
- Knowledge of but not reliant on Prototype JS, MooTools, Dojo, jQuery
- Identify performance bottlenecks in JavaScript applications
- Build performance minded front end abstractions and systems
- Provide code optimization recommendations
- Prototype and implement optimization techniques
- Benchmark existing code and enhancements
- Participate in design and code reviews
- Code primarily in JavaScript, HTML & CSS
- Interface with other team members to incorporate their innovations and vice versa
- Identify and communicate best practices interpersonal and communication skills, and proven ability to work effectively with all organizational levels
- BS or MS degree in Computer Science or Engineering preferred
Microsoft – Software Development Engineer (SDE)
- Pursuing a B.S./M.S. or Ph.D. degree in Engineering, Computer Science, or related field
- 1-2 years experience programming in C/C++/C#, Java, and/or other computer programming languages preferred
- Ability to derive creative and innovative solutions by thinking “outside the boxâ€
- Expertise in feature definition, design, and feasibility
- Demonstrated skill in estimating development time
Apple - Application Software Engineer
Key Requirements:
- BS CS/CE or equivalent
- Strong programming skills, preferably with C, Objective-C, and/or C++
- Excellent communication and collaborative skills
- Excitement and passion to work on amazing products
- Deep understanding of performance assessment and optimization
- Proven ability to excel in a fast-paced development team
Preferred skills:
- Mac OS X and/or iPhone OS programming experience
- User-interface programming experience
- Familiarity with web technologies and XML
By reviewing the job postings of the leaders in technology, you should be able to get a good idea of what is in demand these days.
I know from past experience when I looking for a job, I often saw postings that listed every programming language known to man: Cobol, Fortran, Pascal, QBasic, C, C++, C#, VB, VB.NET, Java, PHP, Perl, Python, Ruby, etc. Any not only that, they were looking for 10+ years experience in each one. These types of postings are unrealistic, not to mention ridiculous – it is highly unlikely that anyone has all the required experience (especially 10 years of .NET).
There is nothing wrong with learning an outdated or obsolete programming language for fun – I encourage it, if you have the time to learn it. But for advancing your career, a solid understanding of a core language is key.
Beyond programming skills, you might decide to acquire skills in another area such as development estimation, code design, or something non-technical such as communication skills.
How do you decide what you are going to learn next?
5 Steps for WordPress Preparation
If you are self-hosting your WordPress blog (not using WordPress.com), it is a good idea to setup an instance on your local computer.
Setting up a local instance of WordPress and a development environment will help you tweaking theme source files, test upgraded WordPress installations and test plugins – without making changes on your live site. You won’t be using the local instance for posting, but you might want to post a few dummy posts.
Step One: Installing WordPress locally
WordPress has some tutorials on how you can setup a local version of WordPress using tools such as MAMP, XAMPP, etc. depending on your operating system.
- Windows XP with XAMPP
- Windows XP and Vista with WEMP
- WIndows XP and Vista with WLMP
- Gentoo Linux
- Debian Etch Linux
- Debian Linux
- Fedora Linux
- Ubuntu Linux with LAMP
- Mac OSX with MAMP
Step Two: Install a (source/version/revision) control system
It’s unlikely that you will like everything about a WordPress theme, so before you start editing the theme source files, establish a source control repository to keep track of your revision history.
You can use the SCM of your choosing – Smashing Magazine has a review of the 7 most popular revision control systems in use today:
Step 3: Test all your plugins locally
Before you activate any plugins on your live site, install and test any plugins locally. Some plugins may make modifications to your database and potentially corrupt your WordPress installation. Other plugins may not be compatible with your version of WordPress or behave well with your selected theme.
Step 4: Install an IDE (and a FTP client)
The Appearance Editor within the WordPress Admin site is not the most user-friendly for editing and formatting source code. It is better to use a Text Editor or an IDE that supports syntax highlighting. Some of the better IDE include a built-in FTP/SFTP so you don’t need to switch applications when deploying your files.
Editors with Built-In SFTP/FTP
Even if your IDE supports SFTP/FTP, I would still recommend installing a FTP client such as Filezilla.
Edit your files that are under version control and when you are ready to deploy, FTP them to your local WordPress directory.
Step 5: Install WordPress on your web-host
Most web-host will have some sort of one-click WordPress installation through cpanel or GoDaddy’s Hosting Control Center. These make it relatively easy to setup on your web-host without the need of transferring and configuring WordPress files.
Once, WordPress is installed on your web-host, add the FTP server information for your web-host to your FTP client and IDE.
Note: Once you have WordPress deployed on your webhost, I recommend that you backup your WordPress database regularly – this will preserve your posts. See this post from ProBlogger: How to Backup Your WordPress Blog In Three Easy Steps.
* WordPress Icon provided by BlogPerfume.com
Output PDF Binary to Browser in ASP.NET
Here is the code to output PDF Binary to the browser using ASP.NET / VB.NET.
Note: This code assumes that you already have the PDF binary data stored in a byte() array called data.
Response.ClearContent()
Response.ContentType = "application/pdf"
Response.BinaryWrite(buffer)
Response.End()
To add an Open / Save dialog window:
If you encounter errors in Adobe Reader, make sure that your aspx page contains only the page directive:
How to Read a Book Using SQ3R
Before I entered college over 10 years ago, I participated in a 1-day seminar for incoming freshmen called Strategies for Success. The purpose of the seminar was to introduce you to study habits and prepare you for the college workload. What reminded me recently of this seminar was a book that I started reading: ‘Secrets of the Rockstar Programmers’. The book is a collection of interviews with top programmers. In the first chapter I came across a term that looked vaguely familiar: SQ3R. When I got to thinking about it, I recalled that it was during the Strategies for Success workshop that I originally heard about this.
What is SQ3R ?
SQ3R is an reading strategy, abbreviated: Survey, Question, Read, Recite, Review. This technique is meant to be applied to a chapter in a book. Some textbooks have indirectly adopted this strategy by including a chapter outline, a pre-test, chapter summary and a post-test.
If you were to apply SQ3R to a book on the Python programming language, this is how it could be done:
Survey
During this step you want to skim through the chapter and read any headings, diagrams, charts, pictures, etc. You do not want to read too much in depth but rather get a overview of what to expect in the chapter.
Some items that I might pull out of the book are:
- Functions
- Objects
- Indenting
- Lists, Tuples, Dictionaries
- Exceptions
If you don’t understand something upon the first glance, start to formulate some questions.
Question
From the items that you just skimmed were there any items that made you curious or unsure? This is where you want to start formulating some questions. Write down several questions that you want to understand about content you just skimmed. Some questions you might ask are:
- How is indenting my code important in Python?
- What data types are objects?
- What is a tuple?
You may also have a question that is not relevant to the chapter you skimmed such as:
- Why is Python preferred over scripting languages such as Perl?
Though it may not be answered in the chapter, it may be covered in later chapters.
Read
Now you are ready to start reading the chapter. While you are reading start looking for answers to the questions that you posed previously, but try not to ignore the other information.
If the book you are reading contains code, try to walk through the code on paper without typing it into a computer.
Recite
After you have read the chapter, try to summarize by writing down the main points of what you read.
- How is indenting my code important in Python? Indenting is required in Python and results in standardized formatting.
- What data types are objects? All data types are objects.
- What is a tuple? A tuple is an immutable list.
Write down the answers to your questions and then write down any other additional information.
- What does immutable mean?
In this step you should explore the code samples introduced in the chapter. Type and run the sample code to see if the actual output is the same as the expected output when you previously read through the code.
Review
At this point you should be able to comprehend all the main points in the chapter from memory, if not, write down more questions and repeat the read, recite, review steps until it becomes clear.
By completing all the steps of SQ3R you should have a mastery of the chapter content. I find that this strategy tends to work better with technical books or textbooks than with novels.
How does this reading strategy compare to how you typically read a chapter of a technical book?
An Overview of Microsoft PowerShell
I decided to install SQL Server 2008 Express and while I was resolving my prerequisite issues I noticed that one of the requirements was to have Windows PowerShell installed. I have to admit, I have never heard of Windows PowerShell at this point, I just passed this off as another utility that was included as a part of Visual Studio. Since it was a requirement for SQL Server, I installed it. A few days later as I was exploring my Programs folder I noticed an entry for Windows PowerShell, so I decided to take a look.
My first impressions were that it looked a lot like the command window (cmd.exe), until I did a “dir” command; the output was Unix/Linux-like. I then tried a couple of Unix commands such as “ls” and “ps” and surprisingly they worked! Other commands such as “grep” and “who” did not work. It looks like Microsoft had developed a shell comparable to those found on Unix/Linux and they also borrowed a lot.
PowerShell Resources
I was determined to test-drive PowerShell to see what it was capable of, and surprisingly found out that PowerShell had already been out since late 2006 and there was a lot of documentation and tutorials available. Frank Koch (Infrastructure Architect at Microsoft) developed some workshops and documentation for learning PowerShell that are available for download in both English and German. I walked through the first of his tutorials and discovered most of what you can accomplish in the shells of Unix (e.g. ksh, bash), can be accomplished with PowerShell and the syntax is very similar. Most of the commands (called cmdlets) will utilize pipes ‘|’ to redirect the output of a command to another or to a file. PowerShell also supports looping, and formatted output (i.e. csv, xml, html).
Another great site for PowerShell tutorials and resources is PowerShell Pro! One of the more useful features of the site is the Script Library, a forum where users can find/post shell scripts.
When starting to learn PowerShell commands, you will find that there is a lot more typing involved. Many of the commands will use a “verb-noun” context, for example, the equivalent of the “kill” command is “Stop-Process”. Fortunately, like in Unix, PowerShell supports the use of aliases and by default will map most of the known Unix Shell commands to their respective cmdlet. Here is a list of the built-in aliases:
| Alias | Cmdlet |
|---|---|
| ac | Add-Content |
| asnp | Add-PSSnapin |
| clc | Clear-Content |
| cli | Clear-Item |
| clp | Clear-ItemProperty |
| clv | Clear-Variable |
| cpi | Copy-Item |
| cpp | Copy-ItemProperty |
| cvpa | Convert-Path |
| diff | Compare-Object |
| epal | Export-Alias |
| epcsv | Export-Csv |
| fc | Format-Custom |
| fl | Format-List |
| foreach | ForEach-Object |
| ft | Format-Table |
| fw | Format-Wide |
| gal | Get-Alias |
| gc | Get-Content |
| gci | Get-ChildItem |
| gcm | Get-Command |
| gdr | Get-PSDrive |
| ghy | Get-History |
| gi | Get-Item |
| gl | Get-Location |
| gm | Get-Member |
| gp | Get-ItemProperty |
| gps | Get-Process |
| group | Group-Object |
| gsv | Get-Service |
| gsnp | Get-PSSnapin |
| gu | Get-Unique |
| gv | Get-Variable |
| gwmi | Get-WmiObject |
| iex | Invoke-Expression |
| ihy | Invoke-History |
| ii | Invoke-Item |
| ipal | Import-Alias |
| ipcsv | Import-Csv |
| mi | Move-Item |
| mp | Move-ItemProperty |
| nal | New-Alias |
| ndr | New-PSDrive |
| ni | New-Item |
| nv | New-Variable |
| oh | Out-Host |
| rdr | Remove-PSDrive |
| ri | Remove-Item |
| rni | Rename-Item |
| rnp | Rename-ItemProperty |
| rp | Remove-ItemProperty |
| rsnp | Remove-PSSnapin |
| rv | Remove-Variable |
| rvpa | Resolve-Path |
| sal | Set-Alias |
| sasv | Start-Service |
| sc | Set-Content |
| select | Select-Object |
| si | Set-Item |
| sl | Set-Location |
| sleep | Start-Sleep |
| sort | Sort-Object |
| sp | Set-ItemProperty |
| spps | Stop-Process |
| spsv | Stop-Service |
| sv | Set-Variable |
| tee | Tee-Object |
| where | Where-Object |
| write | Write-Output |
| cat | Get-Content |
| cd | Set-Location |
| clear | Clear-Host |
| cp | Copy-Item |
| h | Get-History |
| history | Get-History |
| kill | Stop-Process |
| lp | Out-Printer |
| ls | Get-ChildItem |
| mount | New-PSDrive |
| mv | Move-Item |
| popd | Pop-Location |
| ps | Get-Process |
| pushd | Push-Location |
| pwd | Get-Location |
| r | Invoke-History |
| rm | Remove-Item |
| rmdir | Remove-Item |
| echo | Write-Output |
| cls | Clear-Host |
| chdir | Set-Location |
| copy | Copy-Item |
| del | Remove-Item |
| dir | Get-ChildItem |
| erase | Remove-Item |
| move | Move-Item |
| rd | Remove-Item |
| ren | Rename-Item |
| set | Set-Variable |
| type | Get-Content |
If you use PowerShell regularly, what tasks do you find it is best suited for?
Using Subversion with Xcode, Part III
In Part I, I walked through the process of setting up repositories and projects in Subversion, Part II covered configuring Subversion with Xcode, this part will provide an overview of the SCM tools within Xcode and also show you how to tag and branch your code within Subversion.
Xcode SCM Attributes
If you have your project successfully configured for use with Subversion, once you check-out your files and make any changes Xcode will identify these changes with attributes. Once you start editing a file, an ‘M‘ will show up next to the file in the Groups & Files window. Also, if you add any files to your project these will be identified with a ‘?‘. These attributes will remain until your changes are committed or if you discard your changes.
Committing & Discarding Changes
If you are familiar with other version control systems, you might know committing as ‘check-in’ and discard as ‘undo check-out’. You can commit or discard changes at the file level by right-clicking each file or folder and making the selection or by selecting ‘SCM‘ from the menu and selecting commit or discard changes. The ‘SCM‘ menu also allows you to commit all the changes in your project by selecting ‘Commit Entire Project‘.
Other SCM Tools
The Xcode SCM Menu provides a couple of ways to easily compare the contents of any file that you have checked-out with any revisions committed in Subversion, using FileMerge and the Unix diff tool.
Compare
By selecting ‘Compare With’ from the ‘SCM‘ menu, Xcode will open the FileMerge application that will show each file side-by-side and indicate the differences between each file. In File Merge, you can choose to add or remove any lines in your checked-out file.
Diff
If you have had exposure to the diff tool in Unix/Linux, it is available as an option to use within Xcode. By selecting ‘Diff With‘ from the ‘SCM‘ menu, Xcode will execute the diff command with your currently checked-out file and the revision file that you specify as arguments. The results of this command will be displayed in the current code window.
Subversion Tagging
In Part I, I mentioned that Subversion also has the following folders: tags and branches. The tag folder is used for storing releases or stable builds of your code and allows you recall the correct version of the project files if you need to fix any bugs. Here is a script that will allow you to tag your project, it assumes that whatever the is currently committed in the trunk folder is what you want to tag:
# A script to tag a SVN release
reporoot=/Library/Subversion/Repository/
projdir=Projects
# Prompt for repository name
print -n "Enter repository name:"
read repo
# Prompt for project name
print -n "Enter project name:"
read project
# Prompt for release number
print -n "Enter release number:"
read release
# Tag release
svn copy file://$reporoot/$repo/$projdir/$project/trunk file://$reporoot/$repo/$projdir/$project/tags/release-$release -m "Tagging the $release release of the ‘$project‘ project."
echo
echo Tagging the $release release of the $project project Complete!
echo
Subversion Branching
The branches folder is used for storing code that you want to develop new functionality with or experiment on without making revisions to the code in the trunk. Here is a script that will allow you to branch your code, also it assumes that whatever the is currently committed in the trunk folder is what you want to branch.
# A script to branch a SVN trunk
reporoot=/Library/Subversion/Repository/
projdir=Projects
# Prompt for repository name
print -n "Enter repository name:"
read repo
# Prompt for project name
print -n "Enter project name:"
read project
# Prompt for branch name
print -n "Enter branch name:"
read branch
# Create branch
svn copy file://$reporoot/$repo/$projdir/$project/trunk file://$reporoot/$repo/$projdir/$project/branches/$branch -m "Creating a branch of the ‘$project‘ project."
echo
echo Creating a branch of the $project project Complete!
echo
I hope you enjoyed reading this 3 part tutorial on setting up Subversion within Xcode. Please share your thoughts on how you use Subversion or any other SCM system with your development environment.




















