Saturday, February 27, 2016

New Pad and OpenGL

Lots of changes over the last couple months! I've moved into an apartment all of my own, which has kept me very busy these past weeks. I'm getting better and better at my job every day, and meeting all kinds of new people here in Nebraska.

Shares same code-base as "Kontinuity"
I've had a lot of opportunity at work to build some cool tools that may be able to help in the future. My time there is usually sapped answering phone calls and just doing regular work, but sometimes we get a few minutes of quiet, and when that happens, I work on tools that can help speed up our processes. For instance, we use telnet at work. A lot. Most of our equipment has a telnet interface, so I'm working on a telnet client with preconfigured actions (okay, scripts) that will request information, send commands or do just about anything we can think of. This is going pretty quickly because of my experience working with PyQt already, and since Python is cross platform, it hardly changes the process to make my tools available on Windows (as I do most of my development in Linux).

I had a breakthrough with some of my PyQt coding a few weeks back when I was trying to insert an entry into a database and actually alert my data visualization (in this case, a grid or list) that the data had changed. I fought with this for several weeks, but finally was able to figure out the right way to pass the signal. Before, I had to close and re-open the program in order to see saved changes. Now, when you add an entry, it just shows right up in the main window! I also added a save database option, that actually writes changes to the hard disk (kind of important).

The difficult part comes next: OpenGL. See, I want to be able to put all these events on a timeline. There isn't some QT widget for a timeline that I know of, and aside from that, I want to have precise control over how this timeline acts. For that, I require OpenGL. I want to be able to draw a timeline my own way and be able to do just about anything with it--say, change the color of background for the era you're looking at, expand an entry in a certain year, or zoom in and out to look at weeks, months, decades, whatever you want to see in your view. A pre-built solution will not do because this would be a core part of my timeline program. So I figure it's best to get down to the nuts and bolts and learn how to do this right.

Both programs look pretty similar right now...
QT has a built-in way of adding an OpenGL element to your program, just like any other kind of widget. But actually getting it to work took me weeks. I've actually been working on that one part of my program since December. It's not that it took a lot of code or anything, it's just a little complicated and I found lots of tutorials that went about it in ways that I couldn't do with my program. Finally, one day, after hours of tweaking the script, trying different things, and researching on the internet, it worked. I only had a small triangle in one corner of the screen, but it was working! I was ecstatic.

While in the world of OpenGL, I went down a rabbit-trail on game development. I read an article that really got me thinking about how the medium of games is very much like that of films. Anybody who has known me over the past four years will know that I love telling stories through film. But many of the principles that apply to films also apply to games. Look at how both can be merely cheap entertainment or, if done correctly, they can tell a story in a unique and meaningful way. I'm curious about telling a story in this way, and would certainly like to experiment with it in the future. I don't need anything amazing to drive a point--for example, you tell a story using nothing but small squares. Just another thing that arrests my interest. When I want to learn about how to build a quality game, I watch videos from ExtraCredits, because I think they have some very valid insights. They treat games as an art form, much like how I was learning films need to be treated. In the same way, I view every program I create as a (potential) work of art.

Now that I am on an internet connection of my own, I can fully utilize some tools I'd like to share: Kiwix allows me to download an offline copy of Wikipedia's current state, while Project Gutenburg has an FTP server I intend to utilize. Also, I'm interested in the KA Lite project, and would like to have all three of these sources of information on my home server. Because, you know, I can! Data, data, data...

Sunday, January 10, 2016

Nebraska

It's been a month full of change. Change can be hard, but, as a good friend of mine once said, progress rarely means staying in the same place.

My work as an IT Consultant, paired with my CompTIA A+ Certification, have landed me a full time job with an internet service provider in rural Nebraska called ATC Communications. It's a huge opportunity, and if I can do well at it (I'm learning the ropes ahead of schedule so far), I'll have a solid career option laid out for myself. I'm currently staying at a friend's house and looking for a place of my own to call home.

Right now I'm dealing with all the little details of a move--storing things, changing addresses, assuring friends and family I am still alive. One of the biggest changes has simply been meeting new people while adjusting to living away from those I knew before. My family is a long way off and every house, meeting and town I go to is new to me. It's going to take a while to get used to Nebraska. But the people here are more than friendly, which is particularly meaningful to me as I go through all these changes.

It's going to take me a while to feel really competent at my new job. There are a lot of things to master, but right now I'm learning to take calls from people whose internet, cable or phone connections are having issues and do some basic troubleshooting before dispatching a technician to fix the problem in person. It's challenging, but it is the kind of work that requires a fascination with information technology that I enjoy in a perhaps strange way...

I'm in the process of getting a more permanent residence (hopefully a house--I'd like to avoid an apartment). I'll keep working at my job, learning more every day. I plan on working on my college education at home, though I'll have less time to dedicate to it. And, of course, I'm always working on programming projects like Kontinuity. I've made a few small steps here and there, but for now my main focus is going to be making sure this move goes as smoothly as possible.


Moving to Nebraska was a difficult decision to make. I've lived in a close family, and life without them feels a little surreal. It would have been strange enough to move to a different part of town in Colorado, but now that I am in another state entirely, I have a lot more change to deal with. The places and friends and groups I joined in Colorado are hundreds of miles away. But even though I can't visit every weekend, I keep in mind that those past experiences are all a part of what makes me who I am.

Perhaps the strangest part of the move is the greater sense of responsibility over my life that I feel. Nobody is going to tell me to put paperwork in on time or to check my oil before I ruin my engine--those responsibilities are mine alone. That's an intimidating thought at first, but I remember that this process will make me a better, more competent adult in the end, so I feel ready for the challenge.

Saturday, December 19, 2015

Kontinuity Progress

I have had so much fun working on Kontinuity, and it's not even anywhere close to usable yet!

December has been a busy month. College goes on steadily, I am always busy at the Geek Squad, and there always seems to be just one more Christmas meeting or White Elephant gift exchange to attend. But throughout all the craziness that is life, I keep working on this strange little program, trying to coax modules to work for me, making different parts and pieces link together and start working. Slowly, but steadily, I am seeing something take shape.

Every step, every feature that I am writing requires a bunch of research to make sure if I'm going to be using the right tool, using it the right way, and if it will be compatible with the other tools I'm using. For instance, I could be using Python 2.7 or 3.5. I could use CSV files for data storage, or I could take a little more time and figure out how to use SQLite3 (more than that, there are tons of Python modules for using SQLite3)! Do I want to use QT4 or QT5? What about OpenGL--do I need to create a context or should I try to get by with QT's painting tools?

For the most part, I've decided on what tools to use. Now I am making them work, and that's the hard part. An SQLite3 interface is built into python, so I have a class that lets me input and request data. Easy enough. Thanks to ZetCode for helping me along the way.

I had some trouble getting that data into an actual QT widget. I have been pouring through the QT documentation and converting the C++ code into Python with mixed success. Most of it makes sense after I work with it for a while, but I am still perplexed at times. However, with some time and persistence, I was able to use QTableWidgetItem to throw my python strings into a widget. However, I noticed that after adding an item to the database, even if I tried to redraw the widget, I had to restart the application before seeing the changes take effect. Pondering this problem at about 1AM, I took a few minutes to research the root problem.

It's easy for me to look at the problem as a short-term one. I just need to force this widget to do what I want! Then it will all work, right? Wrong. I'm taking the wrong approach to displaying my data. With a widget like the one I'm using, the entire database is being duplicated for one representation. That means I've got two databases and I'm not modifying the one that's on the screen. I need to be using a model view.

So today I am reading this page which leads me to watch videos on YouTube where the problem is properly explained. (Again, I have to thank someone else on the internet for helping me move along--this time, the shout-out goes to Yasin Uludag--thanks!) Hopefully, when I understand better the base problem, I'll be able to use one database and represent said database in several different formats.

I'd like one of those formats to be using OpenGL, but I spent several hours on creating a context and just never quite got to something that works. I was really close, and I think I can get it with just a little more time and research, but I'm just not there yet. I found a tutorial from KDAB to be immensely helpful, even with it being written in C++. I can't quite get the "versionFunctions()" part working properly in PyQt5, and I suspect it might be because of the differences in how PyQt4 used to handle OpenGL. Not sure on that one, I need to keep researching and testing...

All in all, I'm finding that the only way I can build the tools I need is to keep doing my research. I have to rely on the work of others to get help in figuring out how to tackle the problems I face. But that's the beauty of building and sharing. When we create things, we want to show them to others, to inspire people to create even bigger and better things! I love it when I get those "oh, wow, you can do that?" responses, not because my ego feels like it deserves compliments, but because I know I am inspiring others to to greater things!

I really can't just get on my laptop and code for several hours, expecting to have some brilliant product in the end. That's not how it works. Coding is a process of research, testing and collaboration, and if I have any success, it's because I'm standing on the shoulders of giants.

I look forward to the days ahead (Christmas!!!), and to furthering this project. It's on GitLab for those who are interested, but be warned, it's not very impressive! (yet?)

Monday, November 9, 2015

LibraryBox

Had a great time at the Rocky Mountain Hackathon this weekend! There's nothing like staying up late coding and hearing a fellow student of Computer Science explain the basics of calculus at 3am!* I learned so much in such a small amount of time, and was actually able to make a difference with a team!

I spent a lot of time learning about the various projects and how they are going to make a difference in our country and the rest of the world. Some of them were apps for connecting communities to church, others were more about getting resources and information to countries around the world. There was one that helps make translating the Bible easier, and possible to do online with others. Another team worked on an artificial intelligence bot to scan social media for clues of human trafficking transactions and report them to police.

Roteador Wireless TP-Link TL-MR3040 3G 150MBPS no Paraguai ...The team I joined was working on a portable device that shares educational materials to others over a built-in wireless network. You might be wondering how that can be useful in areas of poverty if people have to have an electronic device to access this content. But that was one of the most surprising things I learned at the hackathon: these people may not have enough money for clean water, but most of them do have feature-phones capable of accessing digital media content! From what I understand, they often need them for online banking transactions. I hadn't thought that could be the case, but several representatives from WorldVenture and Faith Comes By Hearing backed it up.

Because there are so many people with devices that can consume content, there is a huge opportunity for us to get them the materials they need. It gets really exciting when you think of it this way: before, you could bring physical books, which are much larger than this little device and could only be read by one person at a time. Now, with this pocket-sized battery powered router and a USB drive of our choice, we can send gigabytes of data at a time to dozens of clients at once! As long as they have a web browser on their phones, they can download the resources. You can put anything on the devices, really. We were loading them with multiple languages of Khan Academy lessons and K-12 Wikipedia articles (also in multiple languages, depending on the country).

To add to the challenge, we need something that is not culturally or religiously offensive. It also needs to be so simple and understandable that a completely illiterate child could look at the menu and find what they need, in their own language! That's quite a task. That's what I was working on late into the morning for a couple days, and I have to admit, it was a ton of fun.

I was on a team with four other people. I worked a lot with Josh, who was worked a lot on the backend, trying to get a chat interface and other features in working order. We had a graphic designer on the team who created an amazing new logo and several icons. Kirk, the head of the team, knew the most about the devices, and helped us get them set up and running with the custom firmware.

Although we didn't finish the project in the couple days we had, we were able to get an experimental interface more or less working, and we have a clear idea of what to do in the days ahead. I plan on keeping in touch with the team as I continue to develop the frontend. Josh helped me start adding some JQuery to my HTML and CSS code so it could become interactive. I've never used JQuery before, so a lot of my time was spent learning as much as I could in a short time, then trying to put that knowledge to use. I ended up with mixed success, but I put the project on a git repository so I can keep ironing out the kinks.

A little icing on the cake came when we were awarded "Best Overall started before the hackathon!" I was honored and amazed. I felt so undeserving because I just did some web design--nothing real special. But I was on an amazing team, and that team had an amazing goal: giving people a chance at education using the best technology possible who wouldn't have it otherwise. I'm so glad I was a part of that!

I can't believe how hard it was to say goodbye to people I had met just two days ago, but it was. I made some really great friends, met some incredible people and had an amazing time using technology for good. I look forward to keeping in contact and collaborating with the team in the future, and, of course, to next year's hackathon!

*No sarcasm there. It's strangely serene coding in the early morning, and I can't wait to learn calculus in more detail now.

Friday, November 6, 2015

Rocky Mountain Hackathon

Today I am heading out to my first hackathon! I'm looking forward to a weekend full of meeting new people and collaborating with others on a team to create new programs. I don't know exactly what to expect, but I'm pretty sure it's going to be full of long hours of hectic coding. I'm not sure how much I'll be able to contribute with the skills I currently have compared to some of these lifetime software engineers, but I plan on learning as much as I can and making as many connections as possible.

This hackathon has a specific focus on creating programs that will help other people. Projects range from expanding affordable power in Africa to disrupting human trafficking to giving people the tools they need to study as efficiently as possible. I'm going to try to find a project I am enthusiastic about and see if I can learn and contribute any way I can. Sleeping is optional, and we'll have two full days to work on the program. At the end of the hackathon, awards will be given to the best programs.

While looking ahead, I am also experimenting with graphical programs. I don't have much right now, but I am currently using Python 3 and PyQt5 to create a program that can record a name, a type and a date, then output that in a new window. It's not much (yet), but I plan on having it spit the information into an SQLite database and display all the results on a timeline. I think it will be pretty cool, and it would certainly have helped me when studying for my Western Civ 1 college course!

The goal with this program is less about mapping the history of the world, and more about giving people a platform to create any timeline for any history and share it with other people so they can see what you want. That's what gets me excited about it!

Anyway, we'll see where the next few days takes me! I'm looking forward to it with great anticipation!

Wednesday, October 21, 2015

Lynx Program Downloader

Today I am proud to announce version 1.0.0 of my very first finished program, Lynx Program Downloader! This program is really just a bash script that a person could run in any Linux operating system (sorry, no Windows support at this time). It automates the process of downloading your favorite programs on a regular basis, regardless of where you go to for your downloads or what platform you are downloading for. It logs which files have changed since the last download, how long ago you downloaded it, and sorts the downloads into the categories you want them to go into. Because it is script-able, anyone could create the pattern for downloading a file from a given website. Once the program has done it once, you can have it download dozens of files from the same site using the same macro!

You can attach your initials to signify who downloaded the program, and look through the logs to see which files succeeded and which ones failed. A filter decides what files to consider good (.exe's, .deb's, etc.) or bad (.html). Because of its open nature, anyone can take this program and make it run on as many programs and categories as they want by simply editing a CSV file that acts as the program's database.

In my runs, when I tell it to download all files, it takes hours and goes through gigabytes of data because I have so many programs in the spreadsheet! All on its own. It's pretty cool.

I encourage everyone who finds this at all interesting or helpful to give the program a try! You can clone or fork it on GitHub or download the source as a .zip or .tar.gz. You can also report bugs and request features here.

It has been quite a process: I started it at work as my very first scripting job. At first, it worked...unreliably. I never really was happy with it, so I continued on my own, tweaking it every couple weeks. Eventually I got people to try the program and review the code! I went through a ton of editing, changing aspects of the program, adding and removing certain features to bring it to a stable state. I think I have finally gotten to the point where it is stable, and I want to share it with as many people as I can to get it reviewed and tested. So here it is!

I am always getting ideas for another project, and in the future I'd like to use python and QT to create a program with a graphical user interface. I'd like to create a program that presents a timeline--something that a person could use to view certain events in history, whether ours or in a fantasy. I have ideas for filters, events and people to be stored in a database, and I want to be able to zoom in and out of any period in history. This project will be a little more ambitious than this last one, but I am excited to get started and look forward to seeing my work represented in more than a terminal.

I'll be supporting Lynx Program Downloader and working on this new project in my spare time between college and work. I look forward to it and am so excited to start working with Python and QT! Some day, hopefully, I'll be able to use these skills professionally, and I'd also like to work on some KDE projects. Until then, I've got some programming to do!

Sunday, October 4, 2015

Joining Geek Squad

It finally happened! I've been trying to restructure my schedule since I started College back in May, and that meant quitting some things and starting others. The most recent thing I have started is a job with the Geek Squad at Best Buy.

I first saw the Geek Squad in action when I purchased a DSLR camera at Best Buy. I was twelve, and had invested pretty much everything I owned into this camera. I wanted to know that it wasn't the end of the world if I dropped it, so I also had it ensured. The Geek Squad agents helped me understand what plans were available, and I chose one that would also allow me to bring the camera in for a cleaning annually. That was great! I also loved being able to come back to Best Buy just to look at all the cool new gadgets, and the idea of working there stuck around in the back of my mind, though it obviously didn't happen right away.

Fast forward several years, and here I am, having worked as an IT Consultant but needing a job that works better with my college schedule. The experience I gained there ensured that I was qualified to work not just on sales floor, but in my position of choice--as a Geek Squad Agent. I realize going into it, this is going to be a different kind of Consulting. I'm working with a lot more home users, and I have to learn how to do things the Geek Squad way. There are pros and cons to many aspects of the job, but at the end of the day, I still get earn a paycheck while studying for college and help people find solutions for their technological needs.

There is a lot for me to learn now, and I'm going to be very busy for a while, getting used to the new schedule and training. But I look forward the experience, and the better work/school balance!