pw201 + programming   89

Type punning isn't funny: Using pointers to recast in C is bad.
A common C programming technique (casting between pointers to structures) leads to problems when strict aliasing is turned on (as it is if you set -O2 -O3 in gcc).
C  programming  casting  punning 
19 days ago by pw201
Deep C (and C++)
The differences between shallow and deep understanding in C/C++ or how to ace the technical interview.
programming  C  interview 
july 2018 by pw201
Delta Pointers: Buffer Overflow Checks Without the Checks
Using the top bytes of pointers to implement efficent out-of-bound detection.
security  C  pointer  programming  overflow 
april 2018 by pw201
Unrolled thread from @patio11
"Some people really benefit from hearing advice that everyone knows, for the same reason we keep schools open despite every subject in them having been taught before." Mostly related to the tech business.

In that spirit, here's some quick Things Many People Find Too Obvious To Have Told You Already.
programming  business  technology 
february 2018 by pw201
What every systems programmer should know about lockless concurrency
"Seasoned programmers are familiar with concurrency building blocks like mutexes, semaphores, and condition variables. But what makes them work? How do we write concurrent code when we can’t use them, like when we’re working below the operating system in an embedded environment, or when we can’t block due to hard time constraints? And since your system transforms your code into things you didn’t write, running in orders you never asked for, how do multithreaded programs work at all? Concurrency—especially
on modern hardware—is a complicated and unintuitive topic, but let’s try to cover some fundamentals."
concurrency  programming  mutex 
november 2017 by pw201
The Coming Software Apocalypse - The Atlantic
A couple of "make everything better" approaches: visual modelling, and mathematical verifiability.
code  software  complexity  programming 
september 2017 by pw201
C++Now 2017: Niko Matsakis "Rust: Hack Without Fear!" - YouTube
Rust for C++ people (of which I'm not actually one, but it might be interesting anyway).
rust  language  programming 
august 2017 by pw201
Bit Twiddling Hacks
A collection of code snippets for doing useful things (sign extension, determine whether a number is a power of two, and so on).
bit-twiddling  programming  algorithms  c  hacks  twiddling 
october 2016 by pw201
Tech debt and makers vs menders
Notes on how to get good at maintenance, and the transition from scrambling to stability.
programming  business  software  technical-debt  code 
august 2016 by pw201
Knitting
As an analogy to programming.
programming  knitting 
june 2016 by pw201
We only hire the trendiest
More efficient hiring and better tools are cheaper than competing for candidates from the top universities.
tech  programming  hiring  recruiters  google 
march 2016 by pw201
The Deadlock Empire
A nice little web game where you try to break a threaded program by executing a critical section in two threads at once. It's pretty neat.
programming  threads  concurrency  locks  game 
february 2016 by pw201
Locked doors, headaches, and intellectual need | Affording Play
You're more likely to understand what a key is for if you've already encountered a locked door.
education  psychology  programming  learning 
november 2015 by pw201
Start-up Costs: ‘Silicon Valley,’ ‘Halt and Catch Fire,’ and How Microserfdom Ate the World «
It's 20 years since "Microserfs" was published. Here's an article looking at the changing portrayals of the tech industry in fiction, from Microserf's optimism to a more cynical view today.
microserfs  douglas-coupland  technology  silicon-valley  programming 
july 2015 by pw201
The Hiring Post — Quarrelsome
An argument that interviews are bad and we should use standardised problems instead.
interviews  programming  interviewing  hiring  work  interview  software 
june 2015 by pw201
Git from the inside out
If you're someone who understands things best by knowing how the guts of them work, here's a good post on Git's insides.
git  programming  revision-control  internals  blob  hash 
may 2015 by pw201
cmocka - unit testing framework for C
Nifty unit test framework which does the checking arguments and providing return values from stub/mocked functions which I tend to spend a bit of time re-creating each time I write a test.
test  development  programming  testing  unit-test  C 
march 2015 by pw201
"Yer a Developer, Harry" – Programming Is Magic
How being a programmer is a bit like being a wizard. Via andrewducker.
magic  programming  spells  software  wizards 
december 2014 by pw201
tup | Home
Another make replacement. This one looks quite neat.
tools  build  development  tup  programming  make 
september 2014 by pw201
Redo implementation in Python
djb's "redo" make-replacement done in Python.
make  coding  development  programming  redo  djb  python 
september 2014 by pw201
Falsehoods programmers believe about build systems
Things to bear in mind before starting on your quest to replace Make, especially if you're writing your own replacement.
make  build  programming  tools 
september 2014 by pw201
fabricate - The better build tool. Finds dependencies automatically for any language. - Google Project Hosting
Make replacement in Python which finds file dependencies by using strace to work out which files the compiler reads.
python  tools  build  make  programming 
september 2014 by pw201
Embedded in Academia : Proposal for a Friendly Dialect of C
John Regehr and friends note that C compilers aggressive optimising around use of constructs the spec says are "undefined" can lead to unexpected behaviour. They propose a friendly C dialect where compilers would produce unspecified values in response to use of these constructs, but would not feel free to make demons fly out of your nose.
C  programming  language  software-engineering 
august 2014 by pw201
Implementing non-recursive make
Recursive makes are considered harmful. Here's a recipe for a non-recursive one where you can still put project files in subdirectories.
make  programming  nonrecursive  makefiles  build  software 
august 2014 by pw201
Russell91/pythonpy · GitHub
Clever idea: quick way of writing per line loops to process files in Python. Via HN.
python  shell  programming 
august 2014 by pw201
Patching the Newton | Dadhacker
"So, how do you fix bugs in a ROM, if you can’t change the image? The basic idea is that you litter the code with indirect jumps that go through a jump table that’s been copied to RAM. When you need to patch something, chances are that you can do tricky and unnatural things to get control at the right spot, fix things up and continue." This technique hasn't gone away, of course. Tricky and unnatural = fun.
programming  patch  dadhacker  rom 
july 2014 by pw201
Programming Sucks
"Websites that are glorified shopping carts with maybe three dynamic pages are maintained by teams of people around the clock, because the truth is everything is breaking all the time, everywhere, for everyone. Right now someone who works for Facebook is getting tens of thousands of error messages and frantically trying to find the problem before the whole charade collapses."
programming  code  internet  funny 
april 2014 by pw201
Speeding Up Your Engineering Org, Part I: Beyond the Cost Center Mentality
Make investments in reducing latency rather than just comparing hours spent with value gained.
programming  management  latency  speed 
april 2014 by pw201
Printable True Bugs Wait Posters | natashenka
Abstain from strcpy! Wait for the string handling functions which are right for you.
programming  funny  security  bugs  C  stdlib 
february 2014 by pw201
The Descent to C
Simon Tatham introduces C to people who've only worked in high level languages, the innocent little darlings. You 'ad array bounds checking? You were lucky!
C  programming  language 
january 2014 by pw201
What Long Hours Really Mean | We Are Mammoth
Via Hacker News, where there's the usual debate about all this. Previously I've read research which says you can get gains out of doing it for short bursts but must then rest: longer periods of overtime end up producing less, not more. This article is more about the cultural impact, though.
work  programming  hours  overtime  business  productivity 
november 2013 by pw201
Reverse Engineering a D-Link Backdoor - /dev/ttyS0
Interesting post on using a disassembler to find a backdoor someone left in a bunch of D-Link routers.
dlink  backdoor  programming  hacking  router 
october 2013 by pw201
None
A quine (program that produces its own source code as output) which passes through 50 programming languages along the way. Utterly barking, in a good way. Via andrewducker.
quine  programming 
july 2013 by pw201
Coding, Fast and Slow: Developers and the Psychology of Overconfidence
"I’m going to talk today about what goes on in inside developers’ heads when they make estimates, why that’s so hard to fix, and how I personally figured out how to live and write software (for very happy business owners) even though my estimates are just as brutally unreliable as ever." via Andrew Ducker
software  programming  scrum  estimation  daniel-kahneman 
april 2013 by pw201
Embedded in Academia : A Quiz About Integers in C
"The C language's rules for integer operations have some quirks that can make even small programs behave in confusing ways. This post is a review of these rules in the form of a quiz containing 20 questions." I did OK except on the ones about shifts.
arithmetic  integer  C  programming 
june 2012 by pw201
Bash Tips for Power Users
I didn't know about the "fc" command. Nice.
programming  shell  unix  linux  bash 
january 2012 by pw201
Project Euler
"Project Euler is a series of challenging mathematical/computer programming problems that will require more than just mathematical insights to solve. Although mathematics will help you arrive at elegant and efficient methods, the use of a computer and programming skills will be required to solve most problems."
puzzles  maths  mathematics  programming 
january 2012 by pw201
Embedded in Academia : Nine ways to break your systems code using volatile
"The volatile qualifier in C/C++ is a little bit like the C preprocessor: an ugly, blunt tool that is easy to misuse but that — in a very narrow set of circumstances — gets the job done. This article will first briefly explain volatile and its history and then, through a series of examples about how not to use it, explain how to most effectively create correct systems software using volatile. Although this article focuses on C, almost everything in it also applies to C++." Relevant to my interests as compilers get cleverer about re-ordering.
volatile  embedded  programming  C  threads  multicore  memory-model 
november 2011 by pw201
Requests: HTTP for Humans — Requests 0.8.0 documentation
An HTTP library for Python that's less awful than urllib2. Hopefully someone will add it to the standard library at some point. Via Leonard Richardson.
python  http  library  requests  programming 
november 2011 by pw201
Coming Home to Vim / Steve Losh
Someone's page about going back to Vim, listing some config options I didn't know about.
programming  tools  vim  editor  tutorial 
september 2011 by pw201
Lost Garden: Rules of Productivity Presentation
"How do we get more work done? It is a question that every manager and every passionate worker faces. Yet, for the most part, teams operate on gut instinct and habit. The results are less than optimal. Over the years I've been collecting small pieces of research on various factors that actually seem to improve productivity. I've assembled eight of these experiments into a PowerPoint presentation. Feel free to use the graphs and data within to spread these practical ideas throughout your own teams." Via andrewducker.
psychology  programming  software  development  overtime  scrum  productivity 
september 2011 by pw201
Why Philosophers Should Care About Computational Complexity
"One might think that, once we know something is computable, how efficiently it can be computed is a practical question with little further philosophical importance. In this essay, I offer a detailed case that one would be wrong. In particular, I argue that computational complexity theory---the field that studies the resources (such as time, space, and randomness) needed to solve computational problems---leads to new perspectives on the nature of mathematical knowledge, the strong AI debate, computationalism, the problem of logical omniscience, Hume's problem of induction, Goodman's grue riddle, the foundations of quantum mechanics, economic rationality, closed timelike curves, and several other topics of philosophical interest. I end by discussing aspects of complexity theory itself that could benefit from philosophical analysis."
philosophy  programming  complexity  compsci  turing 
september 2011 by pw201
Who broke the build? – PaperCut Blog / News
"Retaliation is a Jenkins CI build monitor that automatically coordinates a foam missile counter-attack against the developer who breaks the build. It does this by playing a pre-programmed control sequence to a USB Foam Missile Launcher to target the offending code monkey." Excellent.
programming  humour  funny  missile  build  integration  jenkins 
august 2011 by pw201
Git Immersion - Brought to you by EdgeCase
Looks like a nice introduction to the "git" version control system. Must get round to understanding that one of these days.
programming  version-control  git  development  tutorial  software  tools 
august 2011 by pw201
App Inventor for Android
Graphical app builder for Android phones, for people who don't want to write Java. Interesting to contrast Google's approach with Apple's here: Apple have effectively banned this sort of thing.
programming  development  tools  google  mobile  android 
july 2010 by pw201
python-on-a-chip - Project Hosting on Google Code
"This project's goals are to develop the PyMite virtual machine, device drivers, high-level libraries and other tools to run a significant subset of the Python language on microcontrollers without an OS." Nice.
python  embedded  programming  hardware  microcontrollers  avr 
june 2010 by pw201
The Swinger « Music Machinery
Turn anything into a jive (well, anything in 4/4 anyway): "The Swinger is a bit of python code that takes any song and makes it swing. It does this be taking each beat and time-stretching the first half of each beat while time-shrinking the second half. It has quite a magical effect."
music  python  audio  programming  software  swing  jive 
may 2010 by pw201
A Turing Machine Overview
Someone has built this excellent mechanical Turing machine (OK, so it has electronics in the read/write head, but it's got real tape).
computers  hardware  programming  software  turing  video  algorithm  history  logic  compsci 
march 2010 by pw201
WebSequenceDiagrams.com - Make Sequence Diagrams with one click
Nice tool for drawing message sequence charts: sort of the MSC equivalent of GraphViz.
design  development  programming  software  tools  msc  message  sequence  diagram 
march 2010 by pw201
A nice cup of rabies - What is LJ doing to my links? Part 4
LJ has been messing about with links to Amazon and other online shops: there's some Javascript which they're serving which re-writes the links (possibly to get LJ some money as an affiliate) and then makes the browser display the old link when you mouse over it. The script source is posted here: it's illuminating.

You do wonder how long LJ can keep cocking it up like this. I'm still here because I don't think Dreamwidth is financially credible and I've noticed that people who've moved tend to get fewer comments, but I'm annoyed that this script was also served on the journals of paying users and boggling at LJ's excuse that they didn't check what the thing did before they started serving it: putting unknown Javascript on your site is such a good idea.
livejournal  internet  dreamwidth  javascript  programming 
march 2010 by pw201
txt2re: headache relief for programmers :: regular expression generator
Generate regular expressions from some sample text by clicking on what you want to match. Neat toy.
programming  software  tools  regexp  regex 
march 2010 by pw201
If every hardware engineer just understood that...
Bunch of low level software people whinge at the hardware designers. A bit Windows-specific, but there are some generally applicable things in there (write-only registers, oh my).
programming  embedded  drivers  windows  hardware  interrupt 
february 2010 by pw201
A Few Billion Lines of Code Later: Using Static Analysis to Find Bugs in the Real World | February 2010 | Communications of the ACM
Bunch of academics write a static checker and take it commercial. They are surprised to find that: Compilers for embedded targets accept stuff which isn't quite C, embedded programmers use the stuff, because we're evil. A worryingly large proportion of programmers are clueless ("No, ANSI lets you write 1 past the end of the array"), concluding that "You cannot often argue with people who are sufficiently confused about technical matters; they think you are the one who doesn't get it. They also tend to get emotional. Arguing reliably kills sales." Also, managers like graphs of bad stuff to go down over time, so don't like the tool to improve. Fun article. Via Metafilter.
programming  analysis  security  software  coverity  development  tools  C 
february 2010 by pw201
The C Programming Language: 4.10 by Brian W Kernighan & Dennis M Ritchie & HP Lovecraft
"C functions may be used recursively; that is, a function may call itself either directly or indirectly. Uninquiring souls may take this as just another peculiarity of those C folk, of whose ways their neighbours speak little to outsiders but much among themselves.

Keener news-followers, however, wondered at the events of the winter of 1927-28, the abnormally large number of calls placed upon the stack, the swiftness with which that list was sorted, the disturbing lack of heap allocation throughout the proceedings, and the secrecy surrounding the affair."
funny  humour  parody  C  programming  lovecraft  horror 
december 2009 by pw201
The Punchtape Letters
"My Dear Malware,

Thank you for your latest news. I agree that your bombarding of on-line programming sites with questions about “cascading style sheets” (whatever they may be) and “rounded corners” (as if anyone cared) will irritate and annoy a certain number (possibly even a large number) of programmers, but it seems a lot of effort to go to."
funny  programming  computers  c.s.-lewis  parody  screwtape  c++ 
december 2009 by pw201
RegEx match open tags except XHTML self-contained tags - Stack Overflow
"If you parse HTML with regex you are giving in to Them and their blasphemous ways which doom us all to inhuman toil for the One whose Name cannot be expressed in the Basic Multilingual Plane, he comes." Quite right: you should use Beautiful Soup like everyone else does.
funny  programming  humour  xml  parse  lovecraft  stackoverflow  regexp  regex  html 
november 2009 by pw201
Anatomy of a Program in Memory : Gustavo Duarte
You had an MMU. Luxury! etc. etc. Interesting article on how the people with real processors do it.
programming  linux  heap  memory  memory-map  page-fault  segmentation-fault  stack 
january 2009 by pw201
Video on the Subtext programming language
A presentation on an interesting visual language, borrowing ideas from logic tables and spreadsheets. The demo was impressive, but I'm not sure how it'd work for larger programs.
language  logic  programming  subtext  languages  video 
april 2008 by pw201
Using Uninitialized Memory for Fun and Profit
Neat tricks for sparse arrays if you care about speed a lot more than storage space.
programming  algorithm  data-structures  sparse  array  computers  compsci 
march 2008 by pw201
« earlier      
per page:    204080120160

related tags

agile  ajax  algorithm  algorithms  aliasing  analysis  and  andrew-plotkin  android  arithmetic  array  async  audio  avr  backdoor  bash  bit-twiddling  bitwise  blob  books  bugs  build  business  c  c++  c.s.-lewis  casting  closures  code  coding  collaboration  comments  community  complexity  compsci  computers  concurrency  coverity  crypto  cryptography  culture  dadhacker  daniel-kahneman  data-structures  debugging  design  development  diagram  djb  dlink  dom  douglas-coupland  dreamwidth  drivers  editor  education  embedded  estimation  events  extension  facebook  failure  firebug  firefox  funny  game  generators  git  google  hacking  hacks  hardware  hash  heap  hiring  history  horror  hours  html  http  humour  if  integer  integration  interactive-fiction  internals  internet  interrupt  interview  interviewing  interviews  iterators  javascript  jenkins  jive  knitting  knuth  language  languages  latency  learning  library  linked-list  linux  lisp  livejournal  locks  logic  lovecraft  magic  make  makefiles  management  mathematics  maths  media  memory  memory-map  memory-model  message  metaclass  methods  microcontrollers  microserfs  missile  mobile  msc  multicore  music  mutex  nonrecursive  or  overflow  overtime  page-fault  parody  parse  patch  performance  philosophy  phishing  php  pki  plugin  pointer  privacy  productivity  programming  projects  psychology  punning  puzzles  python  quine  recruiters  redo  regex  regexp  relationships  requests  research  revision-control  rom  router  rust  safety  science  scifi  screwtape  scrum  security  segmentation-fault  sequence  server  shell  silicon-valley  social  software  software-engineering  sparse  speed  spells  stack  stackoverflow  stdlib  subtext  super  swing  tech  technical-debt  technology  test  testing  threads  tools  tup  turing  tutorial  twiddling  unit-test  unix  urllib2  usenet  version-control  vi  video  vim  volatile  wikipedia  windows  wizards  work  xml  xor  zarf 

Copy this bookmark:



description:


tags: