Saturday, July 17, 2021

Why wait to build a new gaming PC

Maybe some of you deciding on whether to build a Gaming or strong multimedia/editing PC will benefit from this.

Right now most of the PCs, laptops, and components will push you towards DDR4 memory and either AMD's Zen 3 or Intel's 11th Gen processors. 

Instead of building now, I've decided to wait until the next generation of memory and processors expected out in the Winter 2021. Technically, there's already a company producing DDR5 memory, but no motherboards or processors (that I could find) can make use of the new hardware.

There are a few reasons that stuck out to me to wait for the new DDR5 memory hardware:

And here are some reasons to wait for new generation of processors:
So, faster memory with bigger sticks and new sockets are the biggest reasons for waiting to upgrade. Additionally, new graphics cards should be dropping from Intel and AMD in 2022.

DDR5 memory releasing now, but dependent on new processors and motherboards.

Zen 4 release date is late 2022. 

Intel's 12th gen release date late 2021-late 20222.



What are your top reasons for waiting to build a new gaming PC? 

What are your top reasons for not waiting to build a new gaming PC?

Let me know your thoughts in the comments.

Saturday, August 3, 2019

Try Changing your Virtual Device/Emulator from Android Q to Pie if you have Problems with Flutter

As I'm playing around with designing and building a flutter app I learned that it's not always good to go with the latest and greatest. Appears there are some kinks to work out with Android Q or API 29 emulators.

I switched to Android Pie to avoid this error:

Launching lib\main.dart on Android SDK built for x86 in debug mode...
Built build\app\outputs\apk\debug\app-debug.apk.
***Error connecting to the service protocol: HttpException: Connection closed before full header was received, uri = http://127.0.0.1:59999/nnnBU4fdaqs=/ws
Exited (sigterm)

I found the answer on stack overflow:
https://stackoverflow.com/questions/55879550/how-to-fix-httpexception-connection-closed-before-full-header-was-received/56727663#56727663

If you run into this problem and want to downgrade your emulator instead of creating a new one, make sure you run a "cold boot" instead of a "quick boot" the first time you launch. Else, you'll run into another error about not finding "Service: package".
https://stackoverflow.com/questions/53532810/error-launching-application-on-android-sdk-built-for-x86/57342596#57342596

Pie is a much tastier name than Q anyways.


Wednesday, July 4, 2018

I Helped Design Batman's Navigation System!

CodinGame is an awesome site to practice coding and participate in coding competitions. This week I helped Batman save countless people by helping him find his way to bombs in order to disarm them!



The setup was classic Batman. The Joker has planted a bomb somewhere inside of a building. Batman's heat gun can detect the heat signature of the bomb and gives a reading of what direction it's in. Batman is on the outside of the building and can shoot his grappling gun to zip to another window. The problem is that the bomb is about to go off and his heat gun only lets him know what direction the bomb is relative to the gun! My goal was to save several Gotham buildings and individuals by zeroing in on the bomb within a max number of steps.

Mission Accomplished!

CodinGame is great because it gives you a fun little scenario to play along with. It puts practical meaning to whatever problem you're trying to solve. Also, they have cool animations that show you the result of your program. If you write a bad program for Batman's bomb navigation system, you can see it when running through the test cases (a concerned citizen watching remarks, "Why does batman always go to the bottom of the building and just sit there while there's a bomb to disarm?".) In one of the competitions I participated in, I had to design the pod racer that finished the race the fastest. I was competing in real time against others writing their own programs to out-race me.

The Batman problem was an interesting problem based on it's 2D environment. I initially thought it would require a graph solution, with the windows as nodes and edges as the grappling paths between them, but a binary search algorithm, adapted to work in two dimensions, turned out to get the job done.



The problem reminded me back to the days of studying physics and math using vectors.
 The problem simplifies if you break the problem down into each of the dimensions. Breaking the batman problem down into finding the right height and finding the right distance from the left side of the building breaks the problem into two separate binary search problems. The key was to jump to the other half of either the vertical or horizontal dimension and check whether the bomb is still on the same side, in which case we can jump again in the same direction to further cut the field in half, or jump back towards where we came from, half way to the point of where we were before the last jump.


https://www.codingame.com/training/medium/shadows-of-the-knight-episode-1

Saturday, November 4, 2017

The Rise and Fall of My First Project with an External API - Java 9 and ITA Flight API

My Selfishly Needed Flights App

The inspiration

I ran into a problem.

I was searching for flights to Japan for a trip which I was pretty flexible on the particular departure and return dates, so I could get the best deal.

Kayak offers a search with a +/-3 days on to either side of the dates, but even this wasn't enough. Google Flights was a little better offering a full calendar view of dates and prices. However, even this wasn't good enough for what I was looking for. The Google Flights calendar wasn't always updating when I wanted it to, (eg, the month I was departing from loaded but for a month long trip the next month wasn't showing anything until I moved it forward another month, perhaps a config option, but not an easy one to turn on and off, more likely to save from doing extra processing). And, the I wanted to check out different cities. Perhaps, I could purchase two separate tickets instead of one ticket on a flight with a connection. Or, maybe I could drive to Houston or Dallas if it would save a significant amount of money. And, there were some airlines I preferred to be on for the 14 hr flight, and I was even okay with mixing and matching them. (ANA, Delta, and Singapore Air were my preferred choices, ended up going with Delta's new airbus A330 from LA to Tokyo and Southwest from Austin to LA)

Then the light switched on, and I said, "I'll just build a simple flight search app myself."

The Prep

This was the perfect opportunity to learn some new skills, do something I enjoy, and getting something useful out of it at the same time.

I checked for to see if Google had the API available for use. And to my glorious surprise, they did!

https://developers.google.com/qpx-express/

And to my luck, you could use the api for free up to 50 search requests a day. This was perfect, I didn't need anything more than that. Also, they have an demo page where you can input your search parameters in a simple UI and see what the search request would look like formatted in a JSON string.

First I had to decide the tech stack. I've worked mostly in Java, so I thought I'd try to make that work. I was looking for http client libraries like Apache HttpClient, when I came across one of the new features to Java 9: an integrated http client. Sweet! My next goal was to simply use jdk 9 for the entire project.

Writing the Program and Testing

I moved forward finding out how to use Java 9's new Http client classes. It wasn't too much of a problem, actually quite simple and quick. I wanted to POST as I would be sending a JSON string with the http search request to include all of the parameters. It would've been a nightmare to try to include all of the parameters programatically in the URL even in the simplest of searches. I fired up the demo site and set up a simple search and copied the JSON string to a file. I just wanted to see if the POST would work, and even better if the search request was valid.

Alas, after some configuration to the credentials, I was able to get it to hit the API. Success! But the search was in a bad format! Oh no!

I copied the JSON string straight from the demo site, and double checked it to make sure nothing was changed. I thought that was sufficient evidence that it's likely not the formatting of the string but my program was messing with it or I was using the http client wrong. After a lot of debugging, I determined it was that the JSON string being parsed from a text file using FileReader and BufferedReader required the newline (\n) and carriage return (\r) escapes to be entered in the file. The demo site didn't include these things.

What eventually keyed me off was using Postman to get the search to run successfully, just created the right URL and copied the JSON string from the demo site. This worked, and Postman has a cool feature that allows you to get the request in several different programming formats. One of them included the newline and carriage returns, and I tried it with success in my program.

The Kind of Sad Conclusion

This was roughly two weeks ago, and, alas, earlier this week I receive an email that Google will be shutting down the API. I learned that there was some history in how Google came to own the software and there was a 5 year ticking clock that was nearing the end.

I still view this as a success as I was able to learn some cool features of Java 9 and work through debugging my own simple program. I could've just used curl or some Postman, but I wanted to create my own app. The next step would've been creating the JSON string from user inputted search parameters instead of just reading the already created JSON string from a text file. If I do continue with this, (I have until April 2018 to continue using it), I would have to make a tough decision about trying to do the entire project with just jdk 9 or using an external library as the JSON classes that helped create JSON objects and strings in the proper format were stripped out.


*I have no affiliations with any of the companies or sites mentioned.

Sunday, October 15, 2017

I"m Back!

After a short hiatus from this blog, I'm back to updating the blog.

The last year has brought along some remarkable changes. I started my first industry job as a software engineer, not to mention first full-time job, at Ping Identity here in Austin, TX. 

I wanted dedicate all of my time and efforts into starting this job off right, but I'm happy to be back and sharing new on the blog.

The overall goal going from here:
  • Keep up with updates on personal projects.
  • Share interesting articles current and past articles with some of my own thoughts.

Wednesday, October 19, 2016

New Project!

I've been working on a new project recently. The general plan is to create an Android App that will collect data based off a healthcare questionnaire. A short survey, using a number rating system for answers, will pop up at specified time intervals and ask the user to complete it. The data will be stored for various purposes. I'll try to integrate a graph that shows the different levels over the different time intervals.

The inspiration comes from recent visits to the doctor's office and realizing that I'm very unprepared for many of the questions the doctor asks. Details are hard to remember, but they can be helpful for a diagnosis. The goal is only to create something that could help provide a little more information on your next doctor visit if there's a recurring problem that you're watching. I tried to keep a journal/diary, but that proved to be too much to keep up with everyday. Some questionnaires only ask a few questions (under ten) and ask you to give a rating on a numerical scale (ie, 1 to 5).

I worked on an Android App for my class project. While it was relatively easy to create a working app, it seems that there's a lot of potential to create something really great with a little training. So I've found an online class on Udacity, "Developing Android Apps." The class goes over the basics of app developing. It shows you how to do cool things in creating an app, but it also does a great job of explaining the why behind a lot of the tools and design patterns. I highly recommend it so far.

I'll give an update when new progress is made.

Monday, October 10, 2016

Dual Boot Grub Error when updating Windows 10

I currently run both Windows 10 and Linux Mint on my desktop. In the last week or so (early October/late September), I updated Windows 10 (an anniversary update I think it was called? I'll check for sure and update later), and, probably not so coincidentally, I starting having grub errors.

I can't guarantee this will work for everyone, and I have to give credit to this page on askubuntu http://askubuntu.com/questions/654386/windows-10-upgrade-lead-into-grub-rescue, but I just wanted to provide an easy resource to give you something to try to get you back up and running if you're short on time for now. The page was posted last year, so it seems to not be the first time this sort of thing has happened.

Usually grub will open a menu and let me select which OS I want to run when I boot up, but I was getting an error after this Windows 10 update. It said:

error: unknown filesystem.
Entering rescue mode.
grub rescue>

Uh oh, grub rescue? That's not a good sign I thought to myself. Why does grub need to be rescued? So I go searching on my tablet to see if I could find a solution, temporary would suffice as I needed to get some homework done, and I found the question posted on askubuntu.

The problem seems to be that things may have gotten shuffled around a bit with the Windows update. The place where my computer thought grub was located, no longer had grub. So the quick temporary solution is to find where grub actually is now, and set the address to the correct location.

If you type

set

A list of things will pop up. Looking at prefix is where I found my problem. It had mine set to

(hd0,msdos3)/boot/grub

but this wasn't getting the job done.

So type

ls

to see your partitions, and try to find the right one by changing the prefix setting with the following

set prefix=<partition>/boot/grub

where you plug in a partition which in my case was (hd0,msdos4).

You'll know if it works by typing

insmod normal

after setting the new prefix. If it gives you the following error:

error: unknown filesystem.

Then you know grub couldn't be found there, so go back and try another partition (type ls again to see list of partitions).

So for mine I typed in

set prefix=(hd0,msdos4)/boot/grub

and I didn't get an error after typing

insmod normal

Great news! Now just type

normal

and it should take it back to your normal grub menu screen where you can select your OS.

Unfortunately, this is just a temporary solution which you'll have to do any time you reboot, but the partition shouldn't move so you can change the prefix to the right partition right away without having to guess and check. It looks like you can change this setting permanently in a grub file on the filesystem, but I have yet to play around with it.

Hope this helps you get going in the meantime, let me know if you find out more about the problem, or a permanent solution!