RANDOM BITS

A random site by a random clueless human

Random bits of programming, math, and thoughts By a clueless human

2021 Blog Archive (2021)


Dev Blog - Symink Attack - Do not trust config files

December 26, 2021

Now that classes are over for the semester, I decided to resume work on a project I’ve been putting off for a while. ProxyAuth is a passwordless authentication module that allows lazy people like me to access their machine without inputting their passwords. It authenticates the user if their hardware authenticator (i.e. a smartphone) is close to the machine via Bluetooth connection. Currently, the implementation is not convenient and there are a lot of areas that need to be worked on such as the security of the product. In May of 2021, I noticed there were a lot of education...

Read More...


A Reflection of My Internship as a Software Build Intern

December 9, 2021

This is a copy of my reflection report I submitted for Professional Experience Year (PEY), a 16 month internship at a company. The contents of this post does not enclosed any confidential information (verified by a manager) and all names will be redacted since this is the internet. Please note that some of the information are outdated and my experience may not reflect what others experience. I did my internship in 2018-2019 before the pandemic when work was not remote. I had the pleasure of being hired by IBM (International Business Machines Corporation) for my Professional Experience Year. It was...

Read More...


The Value of An Uninitialized Global Variable

November 6, 2021

Recently I started to read C & C++ Under the Hood. As the name implies, the book explores deeper in what goes on in the assembly level using LCC machine language (a simple machine language for educational purposes). One of the fact the author points out is that global variables are initialized to 0. While this should have been common knowledge, I was shocked because I always thought the behavior of an uninitialized variable is garbage (i.e. behavior is undefined and hence can be anything). To my defense, I actively avoid writing code that involves a global variable for various...

Read More...


Using Fedora GNOME VPN Feature

July 30, 2021

vpn   fedora   blog
I recently decided it is about time to start using a VPN for personal use. Although there are many reasons for one to use a VPN such as masking your IP address and location, I only want to get a VPN to encrypt my traffic on Public Wifi. VPN can be great to bypass region locking, but I rarely ever have any issues with this. The VPN provider I chose is NordVPN for no particular reason other than there was a summer deal and is a strong choice for Linux users. Background While the service was great for a few...

Read More...


Questions to Ask In An Interview

July 24, 2021

I have been pondering lately on how to respond when the interviewer asks if you have any questions for them. After much pondering, I have compiled a small list of questions to ask for my next interview. Describe to me an overview of your day at work and the technologies you employ. There are times when the job description does not encapsulate the position you are applying for. I know many students who feel dejected after the first month of their job. The job description can be generic and/or deceitful. I have seen students applying and receiving job positions for...

Read More...


Possible Linker Options to Use to Replicate xlC bloadmap Option on ld

July 15, 2021

Edit: This has not been tested and is merely a suggestion to myself (i.e. I use my blog as my notes). Take my words as a grain of salt) For context, xlC is IBM’s C++ compiler that is used to optimize C/C++ applications on IBM’s supported environments and is out of reach from the hands of the average developer. xlC compiler is typically only used on AIX systems or on mainframes running z/OS or Linux on Power. Today I want to suggest a linker option for g++ (i.e. using the ld linker) that can potentially replicate bloadmap option that exists...

Read More...


What is Name Mangling

July 12, 2021

Today I want to explore what name mangling is in C++ and what does extern "C" means. Prelude Recently I came across a question about name mangling from a new intern who was working with a developer to resolved an Undefined symbol error causing our aix builds to fail. While the solution was to update our makefile, the intern was curious as to what FOO_EXTERNC was. When they approached me, I had no clue. But after being told that the internal wiki states it was used to prevent mangling, I had a general idea of what FOO_EXTERNC meant in our...

Read More...


C Programming - Variable Length Array (VLA)

June 29, 2021

I always thought it was not possible to create a “dynamic” array in C without the use of malloc till recently where I was introduced to variable length arrays (VLA). Although the use of “dynamic” is a poor choice, the ability to allocate an array at runtime based on a variable whose value is not known till runtime came as a shock to me. Variable length arrays came into C starting from C99 standard (hence not suitable for anyone who works on legacy systems or in projects that follow C89 standard). To illustrate, here’s an example of an array whose...

Read More...


Going Back to School - Expectations and Hopes

June 22, 2021

Perhaps I didn’t give it much thought till now. But what are my expectations and goals I want to go back to school and from this degree? That’s what I will be exploring today and on a quarterly basis as I progress through my studies. Especially since the cost of going for another degree and resigning from my job has a lot of costs financially and time. How Long Will I Be Studying? tldr: 4 years to finish the degree all my credits transferred covers the breadth and elective requirements and a course in discrete mathematics May not finish the...

Read More...


Going Back to School - Why I Choose to Study Math and Physics

June 1, 2021

Today’s post is part 3 of the ongoing series of my decision to go back to school. Though this post is supposed to rationalize and understand why I decided to quit my job to study math and physics, I do not think there is a good reason for this. The idea of going back to school was never a new idea to me as I have been very open to the idea of going back to school ever since I started University. Originally the agreement with my parents when deciding what to do after Highschool was that I graduate from...

Read More...


Going Back to School - Why Would Anyone Go Back?

May 30, 2021

This is part 2 in the ongoing series where I am trying to rationalize/understand to myself and anyone interested in my decision to go back to school. Today’s post goes over why I would even consider going back to school without going into specifics about why I choose to study Math and Physics. The thought of going back to school dreads a lot of people. Why go back after spending 4 exhausting years studying and trying to find the money to pay for your education. However, there are many reasons why a person would go back to school. It’s usually...

Read More...


Error Loading Shared Library Even If File Exists

May 27, 2021

Have you ever encountered an error running a program where it’s missing a dll or a shared library? In my previous blogs such as A Dive to the Build Process or Debugging expr with ldd, I have explained briefly went over ldd and the usage of shared libraries. Today, I want to expand on this topic by going over something I encountered at work. At work, one of my tasks was to do a proof of concept (PoC) on transferring and running a development build of our product to some new internal development environment. During my work, I kept encountering...

Read More...


Going Back to School - Another Undergrad

May 16, 2021

As the title states, I decided to resign from my job and go back to University for another undergrad. This was not something I thought about overnight but for a very long time since I was a sophomore. Terminating my employment with the company I work with isn’t due to any ill feelings to the team nor the company. I love working with my manager and with those in my team. Though I enjoyed my studies in Computer Science, I never wanted to study Computer Science nor work in the IT industry as a profession since Highschool. I wanted programming...

Read More...


A Dive to the Build Process - What Goes On When You Press the Play Button

April 14, 2021

On my previous post What does the Build Team Do, I covered various topics about builds and devOps. Today, I want to go more in depth on what goes on when you press the run button which I briefly brushed over in the previous post. This does get quite technical but don’t fret. I have stopped myself from writing and reading up in depth about the topic to avoid going through the rabbit hole. If you prefer looking at the slides, I’ll provide them below: What is a Build For the sake of those who did not read my previous...

Read More...


Presentation - What Goes On When You Press the Play Button

April 10, 2021

Although still under progress, I have been dabbling with reveal.js, an HTML presentation framework. It’s absolutely beautiful and has markdown and tex support which is excellent. I wanted to create a presentation that is more functional to showcase computer science concepts and found OpenOffice Impress to be unsuitable. After viewing the demo for reveal.js, I was immediately sold. It contains so many features that I need and has a low learning curve for someone who has sufficient HTML experience. I’ve been writing a blog in preparation for an educational session I plan on holding for the team and the new...

Read More...


What does the Build Team Do - An Overview of Builds and DevOps

April 2, 2021

In my undergraduate in Computer Science, I got the opportunity to work at IBM as a member of the Build Infrastructure Team. I had absolutely no clue what the Build Infrastructure Team is or does. Though I am no expert and I still have a difficult time explaining what I do to friends and family, I’ll try to tackle the subject to the best of my ability. This post is a precursor to an education session titled An Overview of DevOps and Builds I plan to give to new interns of the Build Infrastructure Team at IBM this May. I...

Read More...


Software Ports

March 13, 2021

Software porting is the process of adapting a program to be able to execute in another computing environment that differs from the originally intended computing environment. Software ports are commonly known to consumers as the Supported Operating Systems, Software Compatibility or Supported Platforms label commonly seen under requirements when downloading or purchasing videogames, electronics. As a longtime Window user (till 2016), I never encountered any issues with software capability issues before. I think the only time I encountered such an issue was when my brother and I were trying to program an 8527 Lego MindStorms NXT using the NXT-G software...

Read More...


printf - Reordering Arguments using $

February 28, 2021

I was recently watching a video by Live Overflow helping a person troubleshoot a format string exploit through Twitter, and saw something I was very curious about. In the video, the Yotuber poses a question to the person if they could describe how %2$s prints a string. I have never seen this syntax before. What does the dollar sign ($) serve in the format string? This got me curious so I went searching on the internet and the man pages to find out. Turns out $ is from the POSIX extension and does not appear in C99. Its purpose is...

Read More...


Misconfigured hostname

February 25, 2021

Reminiscing another problem I encounter during my internship at IBM, I encountered an issue with some internal tools during a server migration. One particular issue out of many I would like to discuss is how a misconfiguration to /etc/hosts can cause your script to fail. After identifying all the dependencies that needed to be installed and migrating the database and webserver, we decided to do a simple test to see if the website does what it is supposed to do. To our surprise, a specific feature on the webpage failed to work. This came as a shock because we made...

Read More...


ct - Bad Phone Number

February 14, 2021

During my internship at IBM a while back, I recall encountering an error on some HP UNIX machine when I was trying to checkout a file using the CLI tool cleartool for the version control system Clearcase. # ct co -nc foo.c ct: bad phone number -- foo.c ct: bad phone number -- -nc ct: bad phone number -- co For context, at IBM there are some departments where we still are using a centralized version control system developed by Atria Software in the 90s, now owned by IBM and maintained by both IBM and HCL (though we are transitioning...

Read More...


My 2021 Reading List

January 29, 2021

books   blog
Having no good topic to write for this month’s blog post, I decided to write about the books I plan on reading for the year and why I chose to read them. I never was an avid reader. The books I read in Highschool for fun were typically old computer books I could find in the library or get as gifts. Although there were better books to read from, I learned a lot from them. I started to read and explore books of varying genres during my internship, which led me to read on a somewhat regular schedule. Visit the...

Read More...