Subscribe to Stuck in an Infiniteloop        RSS Feed
- - - - -

Working with Binary Data in Ruby

Icon Leave Comment
Ruby is fun. Ruby is sexy. But Ruby doesn't do underlying bytes as nice as I'd like. But Knowles, whatever do you mean?

Consider the following, I have a file with contents:



If I tell you nothing else about the file, what can you infer? Well it's probably hex, but maybe it's ascii. If you read this file in Ruby and print it out...
- - - - -

Interstellar Review

Icon 8 Comments
SPOILER ALERT

I just watched Interstellar and in an attempt to quantify what I thought was going on, I went to the white board. The missus and I then had a marker duel on the details:



I'm pretty sure there is a plot hole somewhere, but I haven't yet scoured the internet for details.
- - - - -

Burned by Endianness

Icon 4 Comments
Sometimes the best bugs are the ones you unintentionally put in yourself.



Consider the following problem. You have a buffer of arbitrary binary data that is interpreted as various data pieces. In this particular scenario you are putting various sized integers in this buffer. The buffer is defined to be network byte order.

Let's say you...
- - - - -

tmux has changed my life

Icon 1 Comments
I know what you're thinking:

Image reduced in size

But hear me out. I always ran multiple tabs, multiple window setup and it worked. But last week, I had a coworker show me this "program" he used to recreate part of our product's GUI. Basically a shell script that sets up tmux...
* * * * *

Don't Upgrade to Android 5.0

Icon 7 Comments
I have a Samsung Galaxy S5 with Verizon service. Last week I went from Kit Kat [4.4.4] to Lollipop [5.0]. Mistake.

Performance is abysmal. "lag" when using buttons on my phone should not be a thing in 2015. I was experiencing a little bit of this in Kit Kat; one of the reasons to give Lolli a go. One step forward, two steps back.

...
- - - - -

Sometimes You Can't Trust the Header

Icon 1 Comments
Consider the following:

  class SomeApi {    /*      Add name value pair to the underlying object.      Adding multiple pairs with the same name does not       guarantee which one is added.     */    void add(std::string& name, std::string& value);  };
...
- - - - -

An In-Depth Look at AVL Trees Part II

Icon Leave Comment
Now that we've all gotten the annual family visitation out of the way let's delete some nodes!

Basic concepts of AVL Trees and insertion can be found here...
- - - - -

An In-Depth Look at AVL Trees Part I

Icon Leave Comment
Holy crap! It's been four years since the last one of these tutorials? What have I been doing with my life?!?!

Who knows. Without any further ado, here we go:

AVL Trees



For a quick refresher on binary search trees, check out this cool guy's blog post.


Part I

Insertion

...
- - - - -

LinkedIn Has Gone Full Retard

Icon 8 Comments
" Everybody knows you never go full retard."

-Kirk Lazarus

----------

LinkedIn just sent out an email announcement that you can now add a background image to your profile. Verbatim:



Maybe I'm just rapidly approaching the get off my lawn stage, but it would seem to me that this completely misses the point of LinkedIn. Or at...
- - - - -

One Week Left

Icon 3 Comments
It has been quite a busy year and a while since my last blog post. As I give you a moment to dry your eyes from crying tears of happiness of Knowles' return, I wish to brag, but also inform you about a milestone I have been working towards for for a while now.

In a week, the semester ends and I will have completed a Master's Degree in...

  • (9 Pages)
  • +
  • 1
  • 2
  • 3
  • Last »

July 2015

S M T W T F S
   1234
567891011
12131415161718
19202122232425
2627282930 31  

Tags

    Recent Entries

    Recent Comments

    Search My Blog

    0 user(s) viewing

    0 Guests
    0 member(s)
    0 anonymous member(s)