Things Programmers Shout #808
*tests code* “Yes it works!” *tests code with other variables* “Nevermind, it just keeps returning ‘2’ which just happened to be the right answer the first time.” // submitted by @broadwayuponastar

if i look back, i am lost

PR's Tumblrdome

roma★
we're not kids anymore.
Mike Driver

⁂
h
YOU ARE THE REASON
sheepfilms

titsay
Today's Document

★
Stranger Things
NASA
Monterey Bay Aquarium

izzy's playlists!

Discoholic 🪩
$LAYYYTER
seen from United States
seen from United States

seen from United States
seen from United States
seen from United States

seen from United States
seen from Philippines

seen from United States
seen from Italy

seen from Estonia

seen from Canada

seen from United States
seen from United States

seen from Türkiye

seen from United States
seen from Georgia

seen from United States

seen from Thailand
seen from Malaysia

seen from United States
@yetanothertpb
Things Programmers Shout #808
*tests code* “Yes it works!” *tests code with other variables* “Nevermind, it just keeps returning ‘2’ which just happened to be the right answer the first time.” // submitted by @broadwayuponastar

Anya is live and ready to show you everything. Watch her strip, dance, and perform exclusive shows just for you. Interact in real-time and make your fantasies come true.
Free to watch • No registration required • HD streaming
This is my first coding assignment for my software engineering class that started today. It’s going to be a really good semester.
UPDATE: I got my grade back and
“100″
Since this post has gotten some attention, I feel like it’s worth mentioning that this was just the first half of the assignment.
The second half, which we weren’t made aware of until the day we were meant to turn this one in, was to trade USB drives with the person sitting next to us and MODIFY their “unreadable” code without getting any help from them.
This was to teach us two things:
1) In this field, you’ll spend more time working with code written by other people than you will writing original code from a blank slate. The people who wrote the original code will probably not be around to help you. Learning to read code is IMPORTANT, even if it seems unreadable.
2) There is a strong brotherhood/sisterhood among programmers and software engineers. Respect that bond when you’re writing code and documentation. In my professor’s words: “When you write code, pretend that the person who will have to maintain it after you’re gone is a homicidal maniac who knows where you live.”
This class and professor are incredible.
Twitter Bot powered by Heroku
Had fun creating this hahaha. I won’t have to worry what to tweet now.
You can check it out:
Twitter: @OariKirian
Github: KMIito
Just an Update
Alright So I have been considering how I might structure the twitch thing I have been working on for a bit, and I generally have a structure. However a much more interesting question would be how I manage sending notifications.
With Notifications I have finally gotten an idea: the general program for notifications will probably have a basic module system. Obviously I will probably have it support libnotify as a base, however for my purposes I already know I want to try to do.
Just one quick commit by Camerash https://www.reddit.com/r/ProgrammerHumor/comments/8llv77/just_one_quick_commit/?utm_source=ifttt

Anya is live and ready to show you everything. Watch her strip, dance, and perform exclusive shows just for you. Interact in real-time and make your fantasies come true.
Free to watch • No registration required • HD streaming
I’m telling you elephants are chill motherfuckers. They fucking love being helpful. They once defended a man with heatstroke from a truck that came to rescue him. They knew he was sick, laying against a tree for shade. They were watching over him and petting him, and they threatened to charge the vehicle for coming towards him. Another person passed out, and elephants cried over her and buried her body in a traditional elephant funeral. (Piling branches on her). And were quite spooked when she got up later. And an elephant was helping workers to put logs in holes for a wall. On one hole, the elephant absolutely refused to set the log in, despite being punished and goaded. Turns out there was a sleeping dog in the hole.
There are so many good elephants stories. They will even help zookeepers wash other elephants– literally, a zookeeper can be like “[Name 1], please wash [Name 2]” and he will go wash that elephant correctly. Listen guys. Not only are elephants people, but they’re largely better people than us. I’m 10000% serious.
“It’s all about color. It’s about people deciding what you deserve. About people wanting what they don’t deserve. About whites thinking they run this world no matter what.”
That’s the dumbest, simplest form of racism ever. To see it paraded as enlightened thought is sickening.
Cops do something? Blame white people.
Someone makes a decision to be evil? Blame the thing they didn’t decide.
Tumblr thinks this is intelligent apparently.
“I know what you can do”. You know who’s capable of evil? Anybody. Anybody could have done those things. Anybody is capable of harming others. Including you. No amount of victimhood will ever prevent you from committing evil, or excuse it.
This scene was over a racist drawing of a white guy.
Here’s another quote from the movie;
Erin Gruwell: Maybe we should talk about art. Tito’s got real talent, don’t you think? You know something? I saw a picture just like this once, in a museum. Only it wasn’t a black man, it was a jewish man. And instead of the big lips he had a really big nose, like a rat’s nose. But he wasn’t just one particular jewish man. This was a drawing of all jews. And these drawings were put in the newspapers by the most famous gang in history.
>You think you know all about gangs? You’re amateurs. This gang will put you all to shame. And they started out poor and angry and everybody looked down on them. Until one man decided to give them some pride, an identity… and somebody to blame. You take over neighborhoods? That’s nothing compared to them. They took over countries. You want to know how? They just wiped out everybody else. Yeah, they wiped out everybody they didn’t like and everybody they blamed for their life being hard. And one of the ways they did it was by doing this: see, they print pictures like this in the newspapers, jewish people with big, long noses… blacks with big, fat lips.
>They’d also published scientific evidence that proved that jews and blacks were the lowest form of human species. Jews and blacks were more like animals. And because they were just like animals it didn’t matter if they lived or died. In fact, life would be a whole lot better if they were all dead. That’s how a holocaust happens. And that’s what you all think of each other.
That’s right. The movie likens the drawing to anti-semitic caricatures by Nazis. Correctly.
Did someone really try to use this movie to defend this stupid idea. I feel like they should keep watching the movie.
Absences and Excuses
Alright, so I’ve been gone for a while, and I feel that I should probably explain why. Last I posted, I got CI/CD stuff done.
Well, I uncovered a few bugs, and fixed them. Eventually, I ended up putting it on pause. The reason for doing so was basically that, I ran into a few bugs that I’m not sure why occur. I'm not sure where the issue occurs either, mainly because of the fact that it seems to only affect a handful of things in some games. In the end, I was getting frustrated and it was starting to effect my ability to work on it, so I put it off. I do plan on resuming it eventually though.
So, for now, most of my work is focused on another project, OpenSplit - which aims to be an Open Source, Cross-Platform alternative to LiveSplit, but written in pure C. Lately I've been working on the 'core' program, which is essentially anything that might want to be used irrespective of the GUI project stuff, and ended up creating a configuration script without GNU Autotools or CMake. So yeah, I'm currently writing a configure script by hand, especially one that is POSIX compatabile.
I hate it. It sucks, take my advice and it's probably better to just use GNU Autotools after writing a configure script once.
Unit Testing!
Alright, so I spent most of the day working on setting up unit testing on my home machine, so I could also run it locally as well. So far so good!
I don't have Jenkins setup yet, so I'm not going to begin to set that up yet, so the wait will be a bit longer before I start doing CI/CD completely.
However, I would like to note that Criterion is actually really easy, and rather nice to use. All of the changes have been committed as well.

Anya is live and ready to show you everything. Watch her strip, dance, and perform exclusive shows just for you. Interact in real-time and make your fantasies come true.
Free to watch • No registration required • HD streaming
Finally!
So, as you all know I was setting up Jenkins so that I would be able to build on a node that wasn't the master. Well, I finally got that done. The Jenkins setup was complete a few days ago, I just needed to install a few things onto the node to be complete.
You see, for Unit Testing for the emulator, I chose Criterion, however I ended up having to build it from source, and I've installed things from source before, so it should be easy...right?
As you can probably guess, no. No, it wasn't easy. Mainly because I ran into an error invloving one of the dependencies of Criterion, BoxFort, having changed the name of one of the structures (it was bxf_spawn_params being renamed causing issues, in my case). The solution took me a day or two to find, which was in an issue that had been closed and gave me an area to look.
You see, Criterion will automatically fetch and build a version of BoxFort if you don't have it installed...however the catch is that it uses a different version than the current latest version...which is a version that was before the bxf_spawn_params change. So, I had to remove the install of BoxFort and let Criterion manage it.
The commit speifically that Criterion uses is 7ed0cf2 while the commit that caused this issue is c99f527. So yeah...I ended up leaving a comment on a Criterion Bug about this issue (that was closed), detailing the issue to anyone that happens to stumble across it until it is fixed.
You can read the bug here.
And it’s (almost) live!
In the last post I mentioned a new site, and it was rather...basic...
However it has been udpated to look modern now! The setup took a bit of time to get correct, but it works! Further it's setup so that you can download files from the server too!
Of course, Jenkins isn't completely setup, but beyond that things are shaping up rather well!
Hopefully things will be getting closer to completion within the next day, and I'll return to development on my emualator!
New Site and Changes!
So, if you can’t tell the blog is under a new URL, which is apart of new changes to this blog!
First off, the new URL which is apart of my website naming scheme. That's right yetanothertbp.tumblr.com is now blog.sapeint.us.to! Rather generic, I know, but hey it works!
Also if you notice that there is now a new option on my blog which says website (if you are on desktop)! This links to the homepage of my website (which is located here).
Now some of you may be wondering why there isn't any SSL protection...well that's because of the fact that it's a us.to domain, and not on the Public Domain List, therefore I'm just waiting to try again and hopefully get a certificate.
My website will also be in the description as well, mainly for those on mobile.
Also my about me page reflects these changes as well!
(My website also contains a link to my Jenkins and downloads for certain platforms as well!)
Quick Update
So I ended up working on the video functions, but got nowhere really. I ended up figuring out a way to encode the x,y coordinates into an array, but there’s an issue...you see the formula I use hy+x=i (i being index, h being height) isn’t reversible without knowing x or y.
You see if you don't know x or y then you get the following: y has infinitely many solutions (as it simpifies to 0=0) and x = i. If you solve for x first you get i, and y then becomes 0. Otherwise you can't really do anything...as such the equation can't be reversed unless y=0 and x=i...which can't happen (as i is the index). Therefore it's only reversable if you know x or y, in addition to i and h.
So what does this mean for graphics? Well, it means that I'll have to have to keep track of at least one of them manually. This kinda sucks, but it's what I have to do. If I keep track of x (which would be easy), all I would have to do is do y=(i-x)/h. So the code would look something like:
int i,x; int y; for(i=0,x=0; i>(height*width); i++, x++){ y=(i-x)/(height); if(gfx[i] == 1) draw(on_color, x, y); else draw(off_color, x, y); if(x>height) x=0; }
of course this isn't what the actual code will look like, but it's a start...well at leat this is what I THINK it should look like, I'm pretty tired and I may not have re-read the drawing code properly...in any case I can barely see what I'm typing so I should probably go to bed
Quick note
The opcode value EE means the opcode is 0x00EE...make sure I handle this properly.

Anya is live and ready to show you everything. Watch her strip, dance, and perform exclusive shows just for you. Interact in real-time and make your fantasies come true.
Free to watch • No registration required • HD streaming
Failures and Mistakes
So....I accidentally deleted a good portion of the source files for the emulator. Yeah..
Alright so an explanation is probably in order. I had opened my project up in Emacs, and it said there was a restoration file, so when I went to delete it from my source directory I noticed there were a few files, one named “*”. So I went to go remove it and did: rm * on accident...what I wanted was rm \* so that it would delete the file named *...but I didn't do that...and for those that don't use the terminal that deletes all files in a directory...without asking anything beyond deleting them...
Yeah....so I deleted a good portion of the source code I had...however none of it was actual emulation code. (You see, I had already moved the emulation code to a sub-directory) so none of that was touched. The only code files I lost was the main file, the input code, and the arguements code. So, you're probaby thinking, you had a git repository as you usually do so you could just restore to head...right?
Right?
Well..that's where you would be wrong...very..very...wrong. You see I had decided that "I'll make one after I get core functionality working"...and then I went and did this...and reminded myself why I should use it. However I had the main file open, thankfully, so I just saved what I had opened and then went to work. First I rewrote parsing, as that was rather easy and important. Then I went to work on rewriting input, which went through some revisions along the way.
So now the code is rewritten. and the project is still ongoing. Well what is the point of this post? Well to post some lessons I learned, in addition to just being a general update post.
So what's changed? 1. Things compile now 2. I created a new header file that will probably be removed soon due to changes in the design that I was trying out.
So what did I learn? 1. Always keep backups, especially if you aren't using version control. 2. I'm an idiot 3. Put the project in a git repo, it costs little and I can just remove it later.
So yeah, that's it...there'll probably be a more significant post tomorrow.
tl;dr - I was an idiot and deleted most of the source files I had without having a backup or using a VCS. I then had to rewrite them from scratch.
Plans, Road-maps, and the Future
Alright, so I figured I should probably make this post, with my current project I figured I should probably lay out my plans, a road-map, and plans for the project.
First off, I want to cover live streaming first. I really want to live stream development of this as much as I can. However, during my previous 'live-stream' it kinda screwed up and I need to take some time to figure out how to better fix things for the next time. However I do look forward to the future.
Now, onto the next point, I do want this to be an FLOSS project, but I'm not sure where to host it. Hosting it on github would be alright, as it has some integrations and nice things (like being able to use Travis CI), and I will state that some changes within how Github operates has made me more likely to return, but I'm still on the line. I might end up doing most things on Bitbucket, but mirroring it on github though.
I also still need to name it (speaking of which, if anyone actually wants to suggest a name feel free, I'm still open to suggestions), although I guess since it's not publicly available it doesn't matter as much.
Now, onto the actual matters involving the development of it. I need to getup some sort of way to check the code to make sure it works and to make things easier on myself in the future. So on that note setting up Unit Tests are probably going to be something I'm going to do within the next little bit, as they are necessary for the future of this project. I also probably need to take a look at linting my code, I just am unsure what might be the best way to do this. Further I need to refactor some of the code to both make it more testable and readable. Finally I need to get some form of CI setup to make it easier to just test my code. So here are some of my plans (in no particular order): * Select a C-linter and start using it * Learn to use Criterion and set it up * Start Unit Testing * Setup some form of CI (Whether it be Jenkins or Travis or gocd) * Put the code on either github or bitbucket or wherever it would fit. * Refactor the code * Name the project
Alright, so I guess I got this done, sorry for the long post today, but I felt it was necessary