Programming

News, information and advice on writing the best code possible.

Stanford Will Teach You Apple’s Swift for Free

Posted In Programming
Apple Swift Example
Interested in building iOS apps with Apple’s new(ish) Swift programming language? Want to learn Swift for free? Stanford University’s School of Engineering now offers a set of lectures (available on iTunes) on Swift, covering everything from user-interface design and animation to networking and performance considerations. But this isn’t a beginners’ series: Prerequisites include C language and object-oriented programming experience “exceeding Programming Abstractions level” as well as “completion of Programming Paradigms.” (Fortunately, Programming Abstractions and Programming Paradigms are likewise available from… continue…

Daily Tip: Debug Early, Debug Often

Posted In Programming
shutterstock_Sven Hoppe
Over the past month, online pundits have drawn attention to what they perceive as a growing number of flaws with Apple’s iOS and Mac OS X operating systems. Both platforms are buggier by the year, they argue, as a consequence of Apple’s laser focus on producing major updates every autumn or so. If you’re a programmer or developer, bugs are a part of life. But when major bugs crop up in a shipped product, it can create huge problems: You… continue…

The State of D in 2015

VisualD
A large company can push a programming language into the proverbial limelight: just look at C#, Java, and Objective-C and Swift. But a few programming languages can punch above their weight without any help from prominent companies or developers. While some of these languages achieved early success only to fall by the wayside (e.g., Delphi), one language that has quietly gained popularity is D, which now ranks 35 in the most recent Tiobe Index. Why D? Inspired by C++, D… continue…

Is Microsoft Truly Embracing Open Source?

Posted In C++/C#, Programming
visualstudio
Back in the day, Microsoft viewed open source and Linux as a threat and did its best to retaliate with FUD and patent threats. So it must have been galling to its executives as, over the past 20 years, the bulk of the Internet came to rely on Apache Web servers; while Microsoft now leads in hostnames (according to Netcraft), Apache remains ahead in terms of hosted active sites. And then a funny thing happened: Whether in the name of… continue…

Is C Still Relevant in the 21st Century?

shutterstock_Family Business
Many programming languages have come and gone since Dennis Ritchie devised C in 1972, and yet C has not only survived three major revisions, but continues to thrive. Large chunks of Windows were written in C, along with most of Linux. But aside from this incredible legacy, what keeps C atop the Tiobe Index? The number of jobs on Dice.com for C programmers is not huge, and many of those also include C++ and Objective-C. On Reddit, the C community,… continue…

Developers: Stop Using Buggy Code

shutterstock_spaxiax
As researchers uncover one serious flaw after another in widely used software, it’s increasingly clear there are lots of vulnerabilities, everywhere. While there are efforts underway to identify and fix these issues before criminals exploit them, the bigger challenge is stopping developers from using buggy code. There is no such thing as perfect software, but developers can reduce the number of bugs by following secure coding practices. There are also tools which can analyze individual libraries—both open-source and commercial—included in… continue…

5 Top Python GUI Frameworks for 2015

pyGUI
As a Python developer, sooner or later you’ll want to write an application with a graphical user interface. Fortunately, there are a lot of options on the tools front: The Python wiki on GUI programming lists over 30 cross-platform frameworks, as well as Pyjamas, a tool for cross-browser Web development based on a port of the Google Web Toolkit. How to choose between all these options for Python GUIs? I started by narrowing it down to those that included all… continue…

Substitute PostgreSQL for Your NoSQL Needs

pking 4th shutterstock
Over the past five years or so, NoSQL databases have enjoyed a spike in popularity compared to relational (i.e., SQL-driven) databases, thanks in large part to industries such as online gaming. A typical NoSQL database can write data 10 or 20 times faster than a relational one, although this speed comes at a price: The data is cached in memory longer before being written to disk, so the data update remains inconsistent longer. As a result, applications that require fast… continue…

Python 3 String-Processing Causing Problems?

Python
Widely known as a general-purpose programming language, Python is excellent at string handling—but a few things have changed between Python 2 and Python 3. This article is a reminder of what Python strings can (still) do for you, as well as a look at what you need to know about Python 3 strings. We discussed some of these Python 3 changes in a previous article. Python 3 relies on Unicode Characters, more specifically UTF-8 as the default source encoding. This… continue…

Building Apps in Swift: Using Storyboards

1
In our previous article on building apps with Apple’s Swift, we demonstrated how to use view controllers and views in code to craft a simple app. Before we begin with this next lesson, using storyboards to build an app in Swift, it’s worth revisiting that first piece. (The code that accompanies the piece is stored on SourceForge as “First Example.zip.”) Remember that view controllers in Swift manage two roles: they controls views on a page or part of a page,… continue…