Keep OSNews alive by becoming a Patreon, by donating through Ko-Fi, or by buying merch!

General Development Archive

Interview: Brian Kernighan

"Originally published in 1978 and updated in 1988, The C Programming Language is considered a 'must-read' classic by most programmers and is generally known simply as 'K&R'. To mark the publication of an ebook version of the 1988 second edition, we interviewed coauthor Brian Kernighan about the C programming language, the book, and future trends." And an Oxford comma to boot. The way it should be.

TypeScript: Microsoft’s replacement for JavaScript

"Everyone seems to have a replacement for JavaScript - Google even has two. Now Microsoft has revealed that Anders Hejlsberg has been working on a replacement and it has released a preview of TypeScript. TypeScript is open source - Apache 2.0 license - and a superset of JavaScript. As you would expect from a Hejlsberg language it incorporates type checking, interfaces and lots of syntactic sugar."

The programmers before us were better

"When I started writing programs in the late 80s it was pretty primitive and required a lot of study and skill. I was a young kid doing this stuff, the adults at that time had it even worse and some of them did start in the punch card era. This was back when programmers really had to earn their keep, and us newer generations are losing appreciation for that. A generation or two ago they may have been been better coders than us. More importantly they were better craftsmen, and we need to think about that." I'm no programmer, but I do understand that the current crop of programmers could learn a whole lot from older generations. I'm not going to burn my fingers on if they were better programmers or not, but I do believe they have a far greater understanding of the actual workings of a computer. Does the average 'app developer' have any clue whatsoever about low-level code, let alone something like assembly?

Code better or code less?

"Having read this, one realization is that better code often means less code. I don't think about lines of code exactly, or something similarly stupid, but in terms of meaningful code. However, argument for less code isn't about making code as compact as possible, avoid redundancy, etc. The argument is about not writing code at all whenever reasonable or possible. Should we focus on deciding what should and what should not built instead of polishing our software development craft then? Yes and no. Yeah, I know. Exactly the kind of answer you expected, isn’t it? Anyway, you can't answer this question meaningfully without a context."

Developers, engineers, scientists

"I've been programming professionally for about 3 years at this point, and I've noticed some interesting patterns in other programmers I've worked with. One of the key differentiators among programmers is motivation. I'm not referring to an individual's passion to simply be successful in their career, but rather the type of work they want to pursue. The thing they want to do with computers every day, the types of problems they are interested in solving."

Learn programming by visualizing code execution

"Online Python Tutor is a free educational tool that helps students overcome a fundamental barrier to learning programming: understanding what happens as the computer executes each line of a program's source code. Using this tool, a teacher or student can write a Python program directly in the web browser and visualize what the computer is doing step-by-step as it executes the program."

J2ObjC: a Java to iOS Objective-C translator from Google

"We are proud to announce the open source release of J2ObjC, a Google-authored translator that converts Java source code into Objective-C source for iPhone/iPad applications. J2ObjC enables Java code to be part of an iOS application's build, as no editing of the generated files is necessary. The goal is to write an application's non-UI code (such as data access, or application logic) in Java, which can then be shared by Android apps, web apps (using GWT), and iOS." Huh.

Hackday with Jolla and friends

Several presentations about mobile Linux technologies, such as Mer, Nemo, and Jolla. Mer is openly developed and meritocratically governed mobile Linux core distribution, which was forked from the various components of the Meego project when it was abandoned by Nokia and Intel. Nemo is a community project which continues the effort of the Meego handset branch. And Jolla is a new startup company created by former Nokia Linux engineers, who participated in Maemo and Harmattan projects, and decided to continue on their own, when Nokia lost their interest in Meego. Their goal is to release end user products (initially handsets) using an operating system based on the Mer core and some components of Nemo, which will be providing their own user interface.

Thinking functionally with Haskell

"Imagine an approach to programming where you write down some description of what your code should do, then before running your code you run some automatic tool to see if the code matches the description. That's Test-driven development, you say! Actually, this is what you are doing when you use static types in most languages too. Types are a description of the code's inputs and outputs, and the check ensures that inputs and outputs match up and are used consistently. Modern type systems - such as in Haskell or above - are very flexible, and allow these descriptions to be quite detailed; plus they are not too obtrusive in use and often very helpful."

Lazarus 1.0 Free Pascal IDE released

After more than a decade, Lazarus has reached version 1.0. For those that don't know Lazarus - it's a Delphi-like IDE for the Free Pascal Compiler and has widget sets for win32/64 GTK2, Qt, and others. It's very very much like Delphi and instead of the VCL it has the LCL which is cross platform. Syntax is almost exactly the same as Delphi. You can create stand-alone win32/64 executables that require no .NET runtime or even an installer.

Learning C with GDB

"Coming from a background in higher-level languages like Ruby, Scheme, or Haskell, learning C can be challenging. In addition to having to wrestle with C's lower-level features like manual memory management and pointers, you have to make do without a REPL. Once you get used to exploratory programming in a REPL, having to deal with the write-compile-run loop is a bit of a bummer. It occurred to me recently that I could use gdb as a pseudo-REPL for C. I've been experimenting with using gdb as a tool for learning C, rather than merely debugging C, and it's a lot of fun. My goal in this post is to show you that gdb is a great tool for learning C. I'll introduce you to a few of my favorite gdb commands, and then I'll demonstrate how you can use gdb to understand a notoriously tricky part of C: the difference between arrays and pointers."

Easy x86-64: x86-64 assembly

I asked for more of this, and I got it. "There has been much interest in assembly lately (whether the real 6502, or the fictional DCPU-16; I even created my own virtual 8-bit CPU called i808 in 2007), but none of this attention focuses on the architecture that is most popular in today's computers. If you are reading this on a desktop, laptop, or server then your computer is most likely using x86-64 (or x86). x86-64 is the 64-bit superset of the 32-bit x86 architecture and any modern CPU from AMD or Intel supports it. This document will focus on the most used parts of x86-64."

Easy 6502: learn 6502 assembly

"In this tiny ebook I'm going to show you how to get started writing 6502 assembly language. I think it's valuable to have an understanding of assembly language. Assembly language is the lowest level of abstraction in computers - the point at which the code is still readable. Assembly language translates directly to the bytes that are executed by your computer's processor. If you understand how it works, you've basically become a computer magician." More of this, please.

Beyond the smartphone: 5 emerging platforms for developers

From the car to the living room, technologies and markets are fast evolving to offer possibilities for programming pioneers. "The smartphone has proven that a marketplace for delivering code can appear seemingly out of nowhere, and developers would have another choice for showcasing their wares. To help you get a jump on these promising platforms, we did a little digging in what might seem to be unlikely places. In many cases, raw APIs are already well-established, ready for apps to exploit them. Scratch the surface, and you'll get an idea of the potential of porting your wares beyond the smartphone/PC paradigm. You can bet the manufacturers of these products are interested in establishing their own app ecology."