Nuances in C: Struct Assignment in C

When I started this post, it was going to be a revolutionary post, talking about something that was really bothering me. As I have spent more time thinking about this, the answer seems so simple and obvious, still there was a time where I did not get this concept, so I here is a brief post on the topic, The question is, in straight C, will this work: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 #include <stdio.h> #include <stdlib.h> #include <string.h> typedef struct point_t { int x,y; } Point; int main(int argc, char **argv) { Point a,b; int c[4] = {1, 2, 3, 4}; b = c; printf("b(%p) is now b[x] = %d, b[y] = %dn", &b, b.x, b.y); return 0; } In C++ this works no problem. Structs are teated like classes where all members have public scope. Assigning one struct to another simple implements the copy constructor that is created by the C++ language, but what about straight C? ...

March 13, 2008 · zacharyzacharyccom

Software Quality, its about attention to detail

Software quality can be measured in many ways. Complexity, efficiency, executable size, these are just a few of the potential metrics. The bad news is that these aren’t normally mutually exclusive. Normally if you maximize one, you might reduce the others. The hardest part of being a developer is deciding where to sacrifice and potentially how to marry the important metrics for each component we write. ...

February 25, 2008 · zacharyzacharyccom

Review of Head Rush AJAX

I recently finished reading Head Rush AJAX and would like to share my comments on the book. This book is written by Head First Labs and is the first of the series I have read. I picked it up because of a recommendation from a friend. I remember looking with disdain at the books in the series when I had seen them on the shelf. I remember thinking, “They look so elementary, we don’t need another ‘For Dummies’ series”. I, like most computer people, have picked up and read a “For Dummies” book, but after you get through your second, they really loose their allure. My first three technology books were from that series, and I have never committed to reading another one. ...

January 18, 2008 · zacharyzacharyccom

Battle of The GTD Apps

Getting Things Done (GTD) has become increasingly popular in past few years. There have been many attempts to build an application that integrates with the whole framework. As a mac user I have been aware of a few, but the big one of the past was Kinkless GTD. This application consists of a bunch of applescripts meant to work with OmniOutliner. There was a lot of hype surrounding the application, and for good reason, it was one of the best options out there. The problem was, it wasn’t good enough for me to get really committed. You had to hit this “sync” button ever couple of seconds to make sure everything was up to date, contexts were confusing, and sometimes the kinkless page would go down for days at a time. Others shared my concerns and now there are several different applications that aim to fill the same gap that KGTD left open. In this article I will be comparing OmniFocus and Things. ...

January 9, 2008 · zacharyzacharyccom

Computer Book Reading list

I have a friend who asked me for a reading list of books. This friend is in a computer related field, but does not have extensive programming background. This could potentially be an issue when applying for jobs, or actually in the job world. In order to help this friend out, I spent some time coming up with a list of books I think should be read by a person in this position. For the purposes of this post I will call my friend Peter. ...

January 3, 2008 · zacharyzacharyccom