Bitmasking with bitflags

The forbidden art of compressing your code into itty-bitty pieces. Microscope not included!


This subject is more advanced and takes time to learn, but as a programmer the knowledge of bitmasking is indispensable. It is used commonly in networking and performance critical areas of code. Another benefit is that it takes up little space. Before we talk about bitmasking, first we must discuss bitflags. What are Bitflags? A bitflag is a single bit of code in the smallest possible form a 1 or 0. One byte of memory...

Authored by Timothy Torres.
Published on 11 November 2017.
Comments
Category: Advanced
Tags: network , optimize , technique


When to rewrite and when to hack code

Sometimes your code needs to be rebuilt. Sometimes your code needs to be hacked with a chainsaw! Know which to use and when.


When a developer is adding code to their project, a common scenario that will occur is a feature needs to expand the functionality of a piece of code beyond the scope of the initial implementation when it was first created. There are two ways to address this. Hack or Rewrite? Over a few months, I had hacked a bunch of quick-fixes for a module that permeated across my entire project. It ballooned into nasty code...

Authored by Timothy Torres.
Published on 22 October 2017.
Comments
Category: Intermediate
Tags: api , design , refactor


Welcome to the Station Crew

Hello? Anyone out there? Hellooooooo?


This is my first post just trying to get things setup. Ideally I would like this blog to serve as a place to put coding tips, techniques, and thoughts. I may post things related to projects I’m currently working on, but that won’t be a guarantee! These first few posts may be lacking in quality as I get accustomed to Jekyll to setup posts and themes. I also would like this blog to have a...

Authored by Timothy Torres.
Published on 17 October 2017.
Comments
Tags: trivial



ABOUT CODESYNDICATE

A 2D spess programmer on a journey (internals not provided) to code paradise.


FOLLOW TIMOTHY


GITHUB PROJECTS

© Copyright 2017