Getting Selenium To Wait For Ajax

Recently, my buddy David and I were getting frustrated with some selenium tests. The issue being that we run into several cases where ajax calls are still being ran while selenium is trying to move on to the next line of code.

Finally, we figured out the solution below. Basically, what it does is return a Boolean based on the amount of active jQuery ajax calls that are going on right now. When the boolean is True the WebDriverWait function allows us to move along in our code. It is a simple, but necessary evil to get selenium tests to work as expected.

** Note requires jQuery

How To Return An Evaluated Instance Of A QuerySet After You Called Delete


We have a Django rest framework endpoint that lists out tasks that are being processed, each task includes its relative status. Say a task is in progress, it would report as “In Progress” then when it is completed by our back-end workers, the task reports as “Successful” and will continue to exist in our database, and there lies the problem. As more and more tasks are added to our system, we continue to have to increase our capacity for the table in our database that holds these task records.


Load the QuerySet object, force Django to evaluate it into memory, then call the delete query on the actual database. Last but not least, return the data that was evaluated into memory.



Using Media Keys With YouTube (Chrome)

Lately, I have been listening to a lot of night-core and dub-step while coding. Whereas I normally use YouTube to listen to these genre of music, it has been very frustrating having to switch to chrome every time I wanted to pause or play the song I was listening too. Therefore I thought it would be fantastic if I could use my media keys in order to control YouTube, even when I wasn’t in Chrome.

At first I was over engineering the idea of creating some sort of python or node based application that’d connect with the YouTube API and stream the songs I wanted automatically. This way I could tie into the system with play and pause. However, during my thinking I decided to simplify my requirements for what I really wanted and that happen to still be the buttons on my keyboard controlling my single instance of YouTube that would be open.

Concluding my journey I found myself looking at and open source chrome plugin called Key Socket Media Keys that’d take my media keys and turn them into little YouTube controllers. BOOM! Solution! I suggest this plugin as it solved my problem,maybe it’ll solve yours. Just remember to refresh your browser after installing.


Wireless Charging Issue With Lumia 950 and DT-900

nokia-lumia-820-920-wireless-charging-plate-dt-900bk-black-p36671-aAs a long time lover of wireless charging technology, I tend to have a two charging pads laying around my place. These pads have lasted me over 3 years; pumping life into my old Lumia 920. However, recently for Christmas I was gifted a Lumia 950. Being super stoked about the continuum, IRIS scanning features, and wireless charging features that the new 950 included, I was super happy when my parents surprised me with this long awaited gift.

Upon the conclusion of opening presents at my parents house, I added my pin number to the phone and setup the IRIS scanner. It worked flawlessly. For a feature currently being pushed to consumers as beta, it sure worked consistently. I already forget that my friends can’t use my phone if I pass it to them locked.

Now comes the point of my first charge, I set my phone on the wireless charging pad to allow it to strengthen itself with some of that google electrical charge. However, I noticed something. When I placed my phone on the charge pad it lit up and started looking for my eyes. For some reason it didn’t know I had just placed it on a wireless charger and it was trying to unlock my phone. I didn’t worry about this too much and just moved on with my life.

orzly-950-caseA week passes and I finally got a case to help protect my 950. The specifics of the case I purchased aren’t really reliant, but I will tell you anyways. The case is clear all the way around with a plastic backing and rubber bumpers produced by Orzly and sold to me via amazon. I really like the looks and feel of this case, as the 950 without the case feels slick and almost scary. The case helps increase the friction between your hand and the phone and boy did I need it.

That night, after putting the case on my phone, I ended up placing it on my wireless charger and tried to get some sleep. It lit up once and searched for my IRIS(even though i was at bed at this point). Obviously it didn’t find it so it blanked out the screen as it is suppose too. Then maybe 2 minutes later the screen popped on again. I thought “this must of been my fault, maybe I forgot to set the sleep settings on my phone.” It wasn’t. The phone proceeded to loop through the process of vibrating and lighting the screen up as if I had just placed the phone back on the charger, the IRIS scanner would go to work again for a few seconds and the phone again would blank out the screen.

This was very weird I thought. I had to test it on my others. Weirdly enough this funky issue only happened on my black DT-900 charger and not my yellow one. I found this very strange. Started looking at the differences between these chargers, because they have to be different. One can’t just always work while the other doesn’t.

After looking up the specs of each and looking at the fine print on the back. I found out that the black DT-900 I own was made in China, whereas my yellow one was made in Thailand. Therefore my conclusion is that the factory in China must have skimmed on some of the materials used to put the chargers they made together. I can only guess that this is why Nokia had more made in Thailand, or another possibility is that China under bid their competitors and Nokia was none the wiser.

Just an interesting note for your Lumia 950 owners. If you haven’t already purchased one of the new Windows Phone’s then I suggest you check your chargers first. Other than that I love the phone! If you have any feedback about the new Windows Phone’s and Wireless Charging, I would love to hear and talk about it in the comment section below. Hope you have a great start to a brand new year! (2016)

Full Time Employment!

smartfile-150x50Hello friends. Over the past few years I have been on a journey to do two specific things. First to gain my Bachelors Degree in Computer Science, then to receive the opportunity of full time employment at a great company. I am two classes away from obtaining my degree, and have just accepted a full time position at SmartFile. I would say that I am very excited that I have almost achieved both!

First off, please check out the history section on my About page. This goes through some of the major steps I took to get to this point in my life. Then, I want to thank all of the people mentioned on that page plus my parents for their help and commitment as they pushed me to be the best me I can be. Finally, I will be starting as a full time Software Engineer/Junior Developer doing all kinds of neat things at SmartFile on January the 4th.

Thank you and have a wonderful New Year everybody!

Continuum: Watch The Lumia 950 And 950 XL Pave The Way

Windows 10 Mobile LogoWhy are people not buying Windows Phones? Especially with it’s amazing new Continuum feature. Well, if I was a consumer and reading a post such as this one by digital trends, I would also be in the majority of people resenting the idea of purchasing a Windows Phone. I mean who wants to purchase a device so unique and bold that everyone else is scared too?

I do. I want to purchase such a device. The press makes it seem like no one is buying these Microsoft Phones, go read up on their statistics.The analytic’s state that Windows Phone’s market share is under 3 percent, just this last year alone. However, lets take a look at the numbers behind it, with 7 billion people in the world and 6 billion of them having cell phones. 3 percent of that is roughly around 180 million people. Does that not sound more appetizing than the 3 percent that the main stream media is being paid to tell you? Yes indeed it does. Welcome to the lies and twists our media use to swindle viewers, readers, and wholesome listeners with. Listen to your gut, research through the crap.

Lets get technical and specific.

First off the Lumia 950 and 950 XL look to be fantastically made phones. Constructed with poly-carbonate and coming with an replaceable backing, battery, and SD card. This device already puts the newest iPhone 6 and 6S to shame. Of course people are going to start flame wars over the Windows Phone’s app selection, yet over the next two years, I’ll be the one getting the cool apps through Windows 10’s universal app movement. Since I am backed by the same Operating System on my phone as people use on their day to day devices, I feel even more secure about this decision. Look at Windows 10, Wasn’t even around officially for a month before it made its way onto over 67 million devices. Let that, along with the projections that Microsoft announced give you confidence in your assumptions.

Now comes the big kick in the face to iPhone user. Right now the typical new Desktop Computer is setup to have a small solid state drive for the operating system, then utilization of an older cheaper platter drive do the work of holding all of the users data such as games and documents. Yet even with this shift in paradigm, we see that less and less platter storage in demand, and more and more cloud storage is being used. As this cultural shift takes place and users become more reliant on the cloud to host their files, more and more windows phone’s running Windows 10 Mobile will be purchased. The selling point? Continuum.

Windows 10 Continuum

Continuum! No I am not talking about a set of real numbers, I am talking about the ability to take your phone with you, plug it into a bigger screen, mouse, and keyboard. Then relaxing while you rush to finish the essay that is due tonight for class. You know what I am talking about. Ridding yourself of the need for an laptop, or desktop. Removing it in full. People keep calling this a “feature” of the new Windows 10 Mobile operating system. They are blind and foolish followers of the media. The future is personal and less heavy than you lightest ultra book; I call it as smartphone.

I predict that in the very near future we will see the smart phone be replaced by fully personal and mobile computers. Sure they will still look like the phone’s we lug around with us today, but they will pack much more CPU power, storage, and capabilities than our minds can even imagine today. I fear our only limit that could crush this dream, would be battery life.

What do you think the future has in store for us? Let me know in the comment section below and may the force be with you.

Your Smartwatch Is Lame

Here it is, the beginning of December and all your friends can do is talk about their super hipster Apple Watch or Microsoft Bands. Yet, you and I, we know the truth. We understand that these are just gimmicks. These are the corporate prototypes and our friends are the beta testers. Most interesting part of all? The corporations that sell these prototypes, are making a profit from it.

One now concludes that the writer of this post must have some complaints, but no. I do not have complains about these products. I have suggestions, improvements, and features that need to be satisfied. Before these are introduced into the world, here is a few features I expect.

Water Proof: This one is super important. A person shouldn’t have to remove their watch while swimming or taking a shower. Whereas most are “sweat resistant”; that is still not “water proof”.

Longer Battery: Smart watches currently have only a day or two of battery power. Until we get these to at least a week, these devices will not be as popular as expected. As someone who has a fitbit, current smartwatches just can’t compare. Maybe one day.

Clunky: Let’s be honest, these guys aren’t the snug fit that a rolex provides, nor will they be within the next year. Maybe your pebble feels right, but is it even touch screen yet?

Needless to say the current line of smartwatches are pathetic and do not live up to my idea of what a smart watch should have. However, they are getting close. I predict in around 5 years we will have smartwatches with these fixed feature/issues. During that time, I’ll just have to keep checking the time with my phone.

Open Source Roller Coaster Tycoon

Rct-boxIf you haven’t been keeping tabs, you probably don’t know this, but I have been playing roller coaster tycoon again. I currently own both the original and RCT3. By far the first wasn’t very user friendly, but it was the BEST. And I would like to expand upon it.

Unfortunately, between my courses and work I am not able to put in a lot of time into actually re-creating the game. However I can start researching and putting two and two together. I am currently most familiar with JavaScript, Python, and C#. So I figure Python will be the chosen language to do the re-creation in. Yet I still am not very familiar with game programming techniques to just start outright. I will need to look into this further and let my findings be known.

Last but not least, if you are interested in helping, feel free to reach out to me. I know there are  other implementations of this game(FreeRCT, etc..). However I believe they just don’t do the original the justice it deserves.

Also not sure if I want it to be a clone, or a very close implementation.

That’s All Folks!

How To Install Adobe Source Code Pro On Fedora 22 (Yoga 2 Pro)

If you code, you need a better font. I suggest Adobe Source Code Pro. Currently I am using it at work, home, in outer-space. Who knows where else it’ll end up. Join me and enjoy a better programming experience.

To install Adobe Source Code Pro on Fedora 22 down the “GNOME Tweak Tool”:

Then download the font:

Next open the tweak tool and select the “Fonts” tab.

From here you can select the exact fonts you wish your system to have. Source Code Pro will be apart of this list.

GNOME Tweak Tool Screenie


SmartFile Initial Linux Box Setup

This past week at my new job I threw together a quick build to do my development upon. Going to leave this log of the OS and software at this point in time for future reference.

Base OS: Fedora 22

GUI: Gnome 3

ALT+Up and ALT-Down to change volume on the fly.


  • python 2.7
  • git
  • vagrant (first run is the slowest)
  • virtual box
  • vim (w/ personal dot files).
  • google chrome
  • visual studio code
  • gcc (compiler)

To Be Continued…