Tumgik
apptober · 4 years
Text
Apptober: 2020 Edition
WHELP I don’t know why I expected October to go differently than the rest of this year but I’m still somehow shocked at how much I did NOT get to. My poor Apptober project may not have gotten the love it deserved this year, but sometimes that’s just how the raspberryPi crumbles.
RTL-SDR: Tinkering With Radio Waves
On the upside I did enjoy my brief dive into the research-hole of learning about Software Defined Radio. AdaFruit especially has some excellent resources that are very accessible to beginners:
Getting Started with RTL-SDR and SDR-Sharp and CubicSDR
Build a radio scanner from a RaspberryPi
I don’t know why tuning into radio stations using software is so much fun considering you can get a handheld radio scanner pretty much anywhere… but somehow it is.
And Now: Sleep
So that’s it, a happy little research project for this year’s Littlest Apptober.
Shoutout to everyone struggling with the motivation and energy to finish projects right now, may your expectations for productivity be tempered with judicious self care 😉
8 notes · View notes
apptober · 4 years
Text
Apptober v4.0: Day 21
Hey, so uhh I kinda fell off of Apptober. This whole pandemic is a huge blow to motivation for a lot of people, myself included. I’ve been on work-from-home orders since March 2020 and have orders to do so until at least June 2021. I’m happy to stay home for the safety of others, but I am also a very extroverted person and not having that social component has been very difficult. As a result, I’ve been struggling with a lot of things and motivation to do a coding project was part of that.
With that out of the way, I wanted to share something cool I wrote. Halloween is coming up and I wanted to do something that would allow the kids that are still gonna go trick-or-treating to get the candy they want but be safe with regards to the pandemic. My plan was to package a few pieces of candy in a little baggy and have the baggies spread out so the kids could just come up and grab one. No need to worry about digging through a bucket of candy every other kid has put their hands in.
So I went out and bought two of the big bags of variety candy. I guess I kind of expected those bags to be pretty uniformly distributed, but I was wrong. One bag had 100 Snickers and only 18 Starburst. I had 50 bags and about 350 pieces of candy. The challenge was spreading the candy out evenly in a way that no bag gets too little candy, too much candy, or too many/few of one type of candy.
Tumblr media
Keep reading
43 notes · View notes
apptober · 4 years
Photo
Tumblr media Tumblr media Tumblr media
Apptober
day 3
For today’s session I went through JavaScript - The Definitive Guide all the way up to chapter 16.4. Even though I am not examining code samples in too much detail and want to get a general insight into what JavaScript can do, there is a lot of material to go over. I am also making written notes which makes it even slower, but I really like scribbling while I study or revise. 📓
Although it seemed inconvenient, I am still following the 6pm rule and it feels good. I am hoping this will make me realize I can’t delay my coursework and other tasks for the evening and push me to do all of this during the day.
There are a couple of reasons I started studying JavaScript, but most importantly, I wanted to give myself a taste of something different. A different paradigm and a way of thinking. I must say - I am not disappointed. JS OOP is something I’ve never seen before (coming from old-school languages like C++ and Java). It’s unusual, messy, but leaves me with so much more room for creativity.
I spent a productive evening studying, listening to The Weeknd and was rewarded with fireworks in the end.
Life is strangely cool sometimes.
7 notes · View notes
apptober · 4 years
Text
Apptober 2019 Day 25
Now that we have all of the calculated values shown, the last thing to do is find the user’s Avatar image! That way users can see their cool armor and weapons! No problem! The Habitica API exposes a call that returns the avatar rendered as a png image!
Tumblr media
Oh, that doesn’t work anymore. According to a GitHub issue that’s been broken since 2017.
Tumblr media
But that is ok, because there is a separate call that produces all of the HTML needed to display the avatar image. So we will just use that!
Waaait…. that doesn’t work either. Ok. Maybe I’m using it wrong.
Tumblr media
The nice thing about open source code is you can always look under the hood and see what is really happening. So, let’s take a look there and…
Tumblr media
Oh. that’s broken too. Ok, well we can always look at the Habitica website and its code, and see how they are getting the avatar image.
After just a bit of research we can tell that they are displaying a lot of images on top of each other in a specific order to make up the entire avatar. The armor, weapons, face, accessories, etc are all loaded separately and when nested together make up the entire picture. Each element is named after the piece of armor, so we can look at the users inventory and just find the corresponding image to display…
Oh. It looks like we can’t actually reference each image separately. They combine them all into a collection of sprite sheets, and then reference the individual locations on those sprite sheets using CSS…
Tumblr media
Ok, that makes sense, lots of games and websites use sprite sheets to improve performance. Except, they have like 6 different sprite sheets, so it is hard to know which one(s) have the images we want.
WAIT - the CSS file automatically knows all of the sprites and their locations, and the names of the css classes matches the name of the inventory item keys! So all we need to do is download the css file used by the website and….
NOPE. The CSS file is rebuilt every time they update the website, and is given a different name each time.
Tumblr media
Aaaaand since Habitica regularly adds new seasonal outfits, that means we would have to manually update our module to use the name of the new css file every few months. Not ideal.
Tumblr media
Hmm… The mobile app is displaying the avatar image, and we already have the source code for that from our project earlier in the month. Lets look through the code there and see what they are doing to render the avatar!
WHOA! They have a custom URL that they are using to load images for the mobile apps, and they can reference each one individually as a png! That could be exactly what we need….
Or we could just redesign our UI and toss out using the Avatar altogether.
Tumblr media
This one works a little bit better with the Magic Mirror aesthetic anyway:
Tumblr media
So we will implement that tomorrow! 
25 notes · View notes
apptober · 4 years
Text
Apptober v3.0: Days 12-13
Got a good amount done this weekend. I was able to have the elevator handle whenever it receives a signal for adding a destination by using the CoreTimer and EventHandler classes we developed earlier. I don’t know if words will do it justice, so just check out this demo:
Tumblr media
It starts with the elevators sending their current floor numbers to the controller for record keeping. One second in, we can pretend that the buttons were pressed on floors 6 and 7, so this information was sent to elevator number 0. Every 2 seconds, it moves up one floor. When it hits floor 6, one of its destinations, it signals that it reached a destination. Then at floor 7, it hit its last destination, so we convey that the floor changed, a destination was reached, and the direction changed to 0 (no direction) to indicate it is ready.
These changes are reflected in this pull request.
32 notes · View notes
apptober · 4 years
Text
Apptober 2019
Date: Oct 4, 2019
Goal: Build a Linux shell in C 😱 due by Wed, Oct 16, 2019, 11:59pm
Update:
MY SHELL CAN CHANGE DIRECTORY! MY SHELL CAN CD!!!
Anyways, the REAL update is that so far, I’ve got a header file with function declarations and function definitions of my built in commands.
The trickiest part was trying to get my main function to execute the commands because I did not want a long ass if-tree main() has no concept of which functions are available. So, I thought, hey I’ll just make an array of functions. AND IT WORKED.
Right now, I only have echo, cd, and quit working.
6 notes · View notes
apptober · 4 years
Text
Apptober: Chapter 2
Short post for today, since all I’m really up for is looking for the components for my raspberry pi radio scanner project (wow is that a mouthful - gonna have to think on a better name, suggestions welcome!).
It looks like there’s an absolute TON of options for RTL-SDR dongles that I can use to turn a raspberry pi into a basic radio scanner (pic below is one by NooElec), and I’m hoping to find something that: A) isn’t too expensive B) will ship relatively soon and C) Isn’t Amazon, though I might have to compromise on that last one depending on how things shake out….
Tumblr media
For now my goal for the project is to play around with getting the raspberryPi to pick up local emergency radio channels.
8 notes · View notes
apptober · 4 years
Text
Apptober pt 1: Scoop
The first tool I want to build for my Coder Utility Belt, I’ve named “scoop”. Its job is to scoop desired values out of a big chunk of data. Basically I want a command line tool that takes a pattern, and prints out the value associated with that pattern in a json file. This was partially inspired by XPath, which is used for getting data out of XML payloads.
Consider the values in this Json file:
[{"A" : {"values": [1, 2, 3]}, "B" : {"name": "bob"}}, // row 0 {"A" : {"values": [4, 5, 6]}, "B" : {"name": "alice"}}, // row 1 {"A" : {"values": [7, 8, 9]}, "B" : {"name": "carol"}}] // row 2
If I pass that file to scoop along with a pattern like 2.A.values.0, the tool would grab index 2 in the data, look up the A key, and then the values key, and then return the value associated with index 0. In this case, it would return the value 7.
Or if I provide the path 1.B.name then it would grab row 1, look in the B object, and return the value associated with the key name, in this case it would return alice.
So that is the first goal! Later we might improve it to return multiple values, allow wild cards or conditionals (like *.B.name to print the names from each row).
I plan to develop this as a Go project, so I can easily build it for multiple platforms. Now to start coding!
5 notes · View notes
apptober · 4 years
Text
Cozy Apptober Beginnings
So this year’s Apptober posts are going to arrive somewhere between fashionably late and a wizard is never late but one thing I can definitely say is that I’m feeling a Pi vibe again this year.
I came across this fascinating tweet at some point during my family’s evacuation from one of the Oregon fires (don’t worry we got very lucky!)  and my brain hasn’t let go of the idea of putting one of these together:
Tumblr media
I might also jump around a bit and use Apptober as an excuse to go back and update my old WallberryTheme for MagicMirror. It certainly needs some love (and a new default weather provider) since Apple shutdown the DarkSky API, and after all the insane smoke this summer I’m thinking it could use some sort of air quality alert or integration 😅
So here’s to a sleepy, somewhat impulsive Apptober ☕️ 🎃
8 notes · View notes
apptober · 4 years
Text
Apptober project: LOADING...
Tumblr media
will be back after this irregularly scheduled nap
3 notes · View notes
apptober · 4 years
Text
Apptober v4.0: Day 2
I went ahead and started a page that will be the “main” item being developed this Apptober. I still don’t know what games I want to do, but I figured a hub of sorts that links to games while also giving out some cool info about the games and theory behind them would be pretty neat. So if you want to find out more about Game Theory, check out my new page: https://daswick.github.io/Game-Theory/. I’ll be updating this pretty consistently as I learn more, so it’s pretty empty (and ugly) as of now, but I’ve got one section up about the most infamous dilemma in game theory that I’m sure you’ll find pretty interesting!
Tumblr media
And I was able to find a game of Tic-Tac-Toe that I had developed while investigating game theory. It turns out that with a fairly simple program, you can make an “AI” that mathematically will never lose a game of Tic-Tac-Toe. Don’t believe me? Go ahead, try it: https://daswick.github.io/Game-Theory/games/TicTacToe.html. If you can win the game with screenshots as proof, I will personally recommend you to the council of the smartest people to have ever lived. Just don’t be discouraged if you can only tie it ;)
13 notes · View notes
apptober · 4 years
Text
Apptober v4.0: Day 1
Man, this year really just came and went. I honestly didn’t even know it was October until I got tagged for Apptober. It’s also weird to think how far I’ve come since I started doing Apptober. My first Apptober experience was when I was just a junior in undergrad. Now I’m an embedded software engineer with a year with my company under my belt. Time really does fly when you spend every waking hour staring at a computer. One thing that hasn’t changed since I started with Apptober is that I always want to learn more. My first year had me learning about user interfaces in C# (which can I just say has not helped me at all now that I work on embedded stuff where the only interface is a terminal?). My second year was learning about synchronization and neural networks. And my third year was learning about… elevator algorithms (hey, it sounded fun). This year is going to be no different. As of lately, I’ve been really interested in the field of artificial intelligence. I just think it’s neat that you can write programs that can schedule all the games of a sport, beat world champions in chess, and read and translate text just from a blurry picture. And it does all of that based on just an insane amount of math. I was kind of contemplating going for a higher degree studying artificial intelligence, but I think I just want to study it casually (I want to learn about it but I think I would hate a career doing it - if that makes sense). One piece of AI that has really piqued my interest is Game Theory (No, not the MatPat series). It turns out that there’s an entire field of mathematics based on how to formulate interactions as games and how to pick optimal strategies. This could mean games like Tic-Tac-Toe or this could mean nuclear plant management. I’ve been meaning to study it but never could fully start, so this is as good a time as any to push myself to learn it. So what am I going to code? Well there’s a number of “games” that can be taken from game theory. Any game from Rock Paper Scissors to Backgammon can be strategized using game theory. Honestly, I don’t know what games I’ll code, but there will definitely be games (that you guys can play!) and there will definitely be math (that will bore you guys!). So let’s go learn some theory, some GAME THEORY! Thanks for reading! Also go check out @apptober to see what the others are doing. There’s a lot of really smart people doing really cool things, so please give your support!
11 notes · View notes
apptober · 4 years
Text
Since nostalgia is a staple ingredient of coziness I’m gonna make an extra effort this year to reblog all the projects of Apptobers Past. Got a tech project you remember fondly? Submit us a post 🎃
Also special shoutout to @array-of-frost and @derrickcodes for their fantastic projects!
3 notes · View notes
apptober · 4 years
Text
You know what I walked straight into that one 🎃
A Gentle Apptober’s Eve
Working on a coding project and posting about about it every day for a month is a huge challenge in a normal year, but considering how exhausting 2020 has been, I’m feeling in the mood for a softer, chiller version of Apptober this year.
So for those of you who are feeling that creative autumn maker’s vibe, but are too burnt out to commit to a month-long coding project, I invite you to participate in:
Cozy Apptober
Tumblr media
Instead of trying to finish a whole coding project and posting about it everyday as in Apptobers past, try one of these bite-sized options (and tag @apptober please, we wanna hear about it!):
Take a moment to appreciate your past coding projects; implement one of those small TODOs or features that you never got around to the first time, or post a screenshot or two, or write about your fav part
Write a post or two about the kind of coding projects that fill you with joy. Do you love javascript development? Want to make games with Unity? Is there something you’re looking forward to building some day?
Choose a project that interests you and do some research on it, then liveblog post about what you find.
post a pic of your rubber duck debugging buddy
As always, happy coding!
(and thanks to @array-of-frost​ for the cozy pumpkin!)
16 notes · View notes
apptober · 4 years
Text
A Gentle Apptober’s Eve
Working on a coding project and posting about about it every day for a month is a huge challenge in a normal year, but considering how exhausting 2020 has been, I’m feeling in the mood for a softer, chiller version of Apptober this year.
So for those of you who are feeling that creative autumn maker’s vibe, but are too burnt out to commit to a month-long coding project, I invite you to participate in:
Cozy Apptober
Tumblr media
Instead of trying to finish a whole coding project and posting about it everyday as in Apptobers past, try one of these bite-sized options (and tag @apptober please, we wanna hear about it!):
Take a moment to appreciate your past coding projects; implement one of those small TODOs or features that you never got around to the first time, or post a screenshot or two, or write about your fav part
Write a post or two about the kind of coding projects that fill you with joy. Do you love javascript development? Want to make games with Unity? Is there something you’re looking forward to building some day?
Choose a project that interests you and do some research on it, then liveblog post about what you find.
post a pic of your rubber duck debugging buddy
As always, happy coding!
(and thanks to @array-of-frost​ for the cozy pumpkin!)
16 notes · View notes
apptober · 4 years
Text
Apptober 2020 Project
Greetings to my fellow Software engineers, programmers, script kiddies and code monkeys! It’s that time of year again when we write code for fun, and post about it every day for fake internet points! I have been AFK for most of this year due to *vaguely gestures at everything*, and Apptober is the perfect time to get back into personal projects.
When I first started programming, I wanted to put together a collection of tools, scripts, and libraries that were useful for programmers. Kind of like Batman’s utility belt, for for solving common computer tasks. Unfortunately, when I was just starting out I had no idea what kinds of things would be useful, and most of the things I thought of could actually be solved using existing tools that I just needed to learn (grep, find, nc, etc).
Now that I have been writing software professionally for several years, I have come up with a handful of tasks that I hate having to do, and would like to automate. So my Apptober goal is to finally start my Programmer Utility Belt, and add a couple of useful tools to it. I’ll be posting all of the code on Github as I go, with summaries of my designs, thoughts, and process here on Tumblr.
I _think_ I’ll be writing most of it in Go, because that is what I’m using the most nowadays, but I might fall back on some familiar Python or Bash scripts too. 
26 notes · View notes
apptober · 4 years
Text
I’m not comfortable with the concept of time in general or the passage of 2020 in particular BUT the sudden onset of pumpkin spice marketing campaigns has alerted me to the fact that we are coming up on:
APPTOBER O’ CLOCK
So who likes the idea of writing a bit of code this season?
9 notes · View notes