Today's Question:  What does your personal desk look like?        GIVE A SHOUT

 C


  Notes on Programming in C

Introduction      Kernighan and Plauger'sThe Elements of Programming Stylewas an important and rightly influential book.  Butsometimes I feel its concise rules were taken as a cookbookapproach to good style instead of the succinct expression ofa philosophy they were meant to be.  If the book claims thatvariable names should be chosen meaningfully, doesn't itthen follow that variables whose names are small essays ontheir use are even better?  Isn't MaximumValueUntilOverflow a better name than maxval?  I don't think so.      What follows is a set...

1,976 0       TIPS C NOTES


  Smuggling data in pointers

While reading up on The ABA Problem I came across a fantastic hack.  The ABA problem, in a nutshell, results from the inability to atomically access both a pointer and a "marked" bit at the same time (read the wikipedia page).  One fun, but very hackish solution is to "smuggle" data in a pointer.  Example:#include "stdio.h"void * smuggle(void * ptr, int value){  return (void *)( (long long)ptr | (value & 3) );}int recoverData(void * ptr){  return (long long)ptr & 3;}void * recoverPointer(void * ptr){  return (void *)( (long long)ptr & (~3) );}int main(...

3,035 0       C DATA POINTER BIT ATOMIC SMUGGLE


  Taking C Seriously

Dennis Ritchie, a co-creator of Unix and C, passed away a few weeks ago, and was honored with many online tributes this weekend for a Dennis Ritchie Day advocated by Tim O’Reilly.It should hardly be necessary to state the importance of Ritchie’s work. C is the #2 language in use today according to the TIOBE rankings (which, while criticized in some quarters, are at least the best system we currently have for gauging such things). In fact, TIOBE’s preface to the October 2011 rankings predicted that a slow but consistent decline in Java will likely m...

2,701 0       C EFFICIENCY DENNIS RITCHIE MEMORIZATION


  A Toast to C

At Cloudmetrx, we use a lot of C. So given the recent passing of UNIX legend Dennis Ritchie, the creator of the C language, we think a toast to C is only fitting.Our extensive reliance on C is especially unusual considering the other languages in our stack – Clojure, Node.js, and other hipster platforms. We aren't predisposed to using older, "venerated" technologies simply because they're older and venerated. But when it comes to high-performant computation, there's just nothing like C. Some will claim Java, but those people are incorrect. There's nothing like C.In my opinion, the reaso...

4,162 0       C POPULARITY DENNIS RITCHIE UNIX TOAST C LANGUAGE


  printf("goodbye, Dennis");

Dennis Ritchie, a father of modern computing, died on October 8th, aged 70EVERY time you tap an iSomething, you are touching a little piece of Steve Jobs. His singular vision shaped the products Apple has conjured up, especially over the last 14 years, after Jobs returned to the helm of the company he had founded. Jobs's death in October resembled the passing of a major religious figure. But all of his technological miracles, along with a billion others sold by Apple's competitors, would be merely pretty receptacles were it not for Dennis Ritchie. It is to him that they owe their digital souls...

2,825 0       MEMORY C DENNIS RITCHIE FATHER OF C


  I've run out of adjectives

The news of Dennis Ritchie's passing hit hard. So much has been written in the past day. His impact was enormous, and outside the tech world, mostly unknown - but very much felt. C underpins everything. My whole career has grown out of C and Unix. Wow.For most engineers working today, it's hard to understand the euphoria I felt in the 70s when a programming language finally came along that I (and everyone else) could use to move up from writing in assembler to a real programming language. We could do everything we needed to do to write all the low-level bits of systems. Before C...

2,549 0       C DEATH JAMES GOSLING DENNIS RITCHIE PRAISE COMMENT


  What Can We Learn From Dennis Ritchie?

As we noted earlier this week, one of the founding fathers of UNIX and the creator of C, Dennis Ritchie, passed away last weekend. While I feel that many in computer science and related fields knew of Ritchie’s importance to the growth and development of, well, everything to do with computing, I think it’s valuable to look back at his accomplishments and place him high in the CS pantheon already populated by Lovelace, Turing, and (although this crowing will be controversial, at least until history has its say) the recently-departed Steve Jobs.UNIX was one of the first multi-user ...

2,586 0       C DEATH FATHER DENNIS RITCHIE FATHER OF C UNIX


  C program to shutdown or turn off computer

C Program to shutdown your computer :- This program turn off i.e shutdown your computer system. Firstly it will asks you to shutdown your computer if you press 'y' the your computer will shutdown in 30 seconds, system function of "stdlib.h" is used to run an executable file shutdown.exe which is present in C:\WINDOWS\system32 in windows-xp. You can use various options while executing shutdown.exe for example -s option shutdown the computer after 30 seconds, if you wish to shutdown immediately then you can write "shutdown -s -t 0" as an argument to system function. If you wish to restart your c...

11,193 0       CODE WINDOWS C SHUTDOWN COMMAND