Nav: (Display/Hide) - Home - About the Author / this page

Current Projects: Americana Engine (Game Engine Development)

Thursday, January 21, 2016

Robinhood Stock Trading


Still waiting, but no longer.

After hearing about Robinhood on a Reddit post in /r/investing back in December that allows you to trade stocks without commissions, I decide to sign up for it at the start of the year in order to get into more diversified stock trading without having to pay a lot from commissions.

What appears to be an easy entrance instead may turn out to be a high barrier to entry. Despite the official FAQ stating approval can take up to five business days, it was at least two weeks after signing up and stuck with an 'account pending' (with the buy button on stocks visible but disabled) before allowing me to proceed. It doesn't appear to be limited to myself, though, as a post shows.

I was eventually approved and was able to start trading at the beginning of February. Initially, trading was an issue as my tablet died and I didn't have a smartphone* available to get on; however I was later able to do so via an Android emulator (such as Bluestacks).

I obtained API access later that year and built my own program to execute trades when away from a mobile device and to focus on implementing the things I wanted to see. As of August 2016 over half of my trades are done off-app.

I opened an account on another brokerage generally as a backup, which got approved quickly, so I'll keep that one mainly for some other trades (such as leaps and options) and for other things RH does not yet support.

Would like to see:

  • Updates the GUI based on actual current time, not the time on the Android device
  • Show max shares to buy on order window instead of tap
  • Buy up to X stocks over a period of time during the day below a set price
  • Tap / confirm = quick market order (in the official app to a certain extent)
  • Toggle line indicators on placed orders and/or breakeven points
  • Notify at certain price (other than +/- 10%)
  • Quick Stock Lists (useful if watching a lot of stocks)
  • Trailing stops
  • IOC, FOK, or pegged orders

Notes:

  • The time between stock price updates is 5 seconds (and 15 during the order entry window). It takes at least 10 to buy or sell shares.
  • Place any market orders made off trading hours as day orders so you don't get unexpected trades; market orders have a 5% collar and they're not 'immediate or cancel' (at least at the time of writing) so they won't trigger if the stock difference between closing and next day's opening is too high (ex. NUGT Feb 11, 2016, +20.7% increase from previous close), but they aren't cancelled either, so the queued order might trigger unexpectedly at some point in the future if the stock slumps. You also cannot tell what price the market order was made at (nor does the email) should it still remain active so you'll need to write it down somewhere.
  • It seems like Twitter mentions to @AskRobinhood or through other social media channels are more likely to go through than standard emails if there is no reply from the latter.
  • After account approval, it is strongly recommended you delete all messages related to any information you attached and sent to them via email, particularly since they now exist as web links and not attachments.
  • You are more likely to get High Volatility Protection warnings when you start a day with a low amount of cash and your portfolio mainly consists of high volatility and/or penny stocks.

Saturday, January 9, 2016

Americana Engine - Into 2016


"Glad to see it's still alive and kicking."

For months I have considered on exiting the game development market; I have previously made future plans on the basis that after my departure from AD, the game was well on its way with a new Kickstarter and a beta out at the end of 2015, with my efforts gone uncredited and my game engine completely unnoticed since its switch over to Unity.

It appears this was not the case, however, and I have chosen to resume production after looking through this month's statistics.

My career as a software developer may very well depend on completion of the game engine (as well as an optional game) and released for others to see; as many companies take working projects into their hiring considerations, I have determined that it is my responsibility to bring usable quality updates on a timely basis if I want even a remote chance at getting hired.

Upcoming in 2016: (not a complete list)

  • Porting to HTML5 - to make it more accessible to web and mobile devices, and also to serve as a means for others to present small demos without requiring the base game.
  • Possible open-source release on GitHub
  • Customizable GUI (what kind of information you can get, however, will be limited)
  • Project Website adjustments

Tuesday, January 5, 2016

Superhuman, Chess Pieces, and Binary Code

The first performance of the Jan 4 premiere of Superhuman has Zoe Wheeler reciting from memory the sequence of 60 chess pieces (30 white, 30 black). Only there are two types of pieces to memorize: a King (White) and Queen (Black). A 0 or a 1. Binary Code.

Although there are over 1 trillion combinations (more like 118 quadrillion) that figure need not apply here.

Memorizing 60 1's and 0's might be a difficult task, but there are ways to cut down on the memorization significantly.

There are various methods of memorizing groups of binary code, including hexadecimal (grouping four 1/0s together to get 0-9, a-f), and base64 (grouping six 1/0s together to produce a letter or a number). I use the latter since I can memorize a string of 10 letters/numbers easier than other options.

Base 64 Summary:

A set of six 0 and 1's (64 possible combinations) are grouped together to form a single letter or number (A-Z, a-z, 0-9). Two more characters are used for the binary values of 63 and 64 since the total number of letters and numbers = 26+26+10 = 62. There aren't a string of seven black/white pieces in a row, so they can be skipped for the purposes of memorizing this.

Solving:

The order the pieces are laid out are as follows (Treating a white piece as a 1, with the piece closest to her as the first):

100101 001001 010010 001001 010100 111010 110110 001010 111001 101101

This can be encoded to base 64 as follows:

37 9 18 9 24 58 54 10 57 45
kIRIT 51J4s

Now it's a matter of memorizing this string, converting it back to binary, and reciting it... in front of a live audience.

Thursday, December 24, 2015

Americana Dawn @ Co-Optional Podcast

There was a mention on Americana Dawn in Dec 24th's Co-Optional podcast in the section 'What games did you Kick-start this year?', where KiteTales mentions AD (considering she provided the narration for the Kickstarter portion of the trailer), while opinions were mainly based on the Greenlight page, which was updated a year ago. I looked this up after finding a post about this on twitter.

I will not say anything more about this, other than the fact that it actually ended last year, unless she was referring to a new Kickstarter already launched this year (in which case I have not seen or heard anything about it) and the official websites have moved while the social media page links (on FB, YT, etc) were not updated to point to them.

Sunday, December 13, 2015

Ghirardelli Chocolate Sale

During my previous visit a day before Thanksgiving, I was handed a coupon for this weekend's sales (although you can obtain the same coupon online). It looks like an ordinary additional 15% off purchase, but it's much more than that. I have used some of the chocolates bought today as part of gift bags for this upcoming Christmas.

Here's the summary of the holiday sales:

  • Large outdoor tent with free samples and hot chocolate
  • Take a picture with Santa
  • 5 Stack Gold Tower: $34.95
  • Large Stand up Bags: $4.25 (Holiday Sea Salt / Peppermint / Classic / Limited Edition Collections)
  • Variety of Christmas Tins
  • Small Stand Up Bags: $2.50 (from $2.99 / $2.66 when buying 5)
  • All Bars: $2.50 (from $3.00)
  • Factory Seconds Case (Dark Chocolate Sea Salt Brownie): $15.00 (from $17.50)
  • 430 Milk and White Squares: $100.00
  • Bulk Candy and 80ct Bags remain unchanged in price

Unlike other sales promotions, you can use this coupon to discount items that were already heavily discounted from the Warehouse Sale (this was confirmed with the assistant manager).

Stand-up bags become $2.18 per bag (buying five of them is not required) and a dozen bars, assuming you don't mind minor quality aesthetics, averages out to be $1.06 (which is around the price lower quality Falize Chocolate bars sell at the 99c store).

If you want to start giving early, the coupon is not consumed when you pay for the chocolates, so you can gift your coupon to someone else.

Saturday, October 31, 2015

Apple Hill Farms

During Halloween, I decided to head over to Apple Hill, mainly to explore, get an Apple Pie, and possibly visit the Chestnut Festival at Smokey Ridge. Despite it being listed today (according to the Apple Hill 2015 website) they did not seem to have it upon passing by late afternoon, although there were a lot of other things to look at. The farms I visited were the following:

Rainbow Orchards: Sells a variety of stuff, including apples, baked goods, jams, apple cider doughnuts and hard cider. Has outdoor seating and music performances on certain days. The size of the doughnut is a bit smaller than a regular doughnut. There is a BBQ out there as well; they sell sandwiches and hotdogs ranging from $5-9. The apple pies here are moderately expensive.

There is a price listing here.

Kids Inc: Sells large apple pies, some apples (they have samples available), and a few vegetables. Contains several vendors and a giant corn maze / pumpkin patch. Menu is located here, with a few pies raised by 50 cents. There is also a grand view of the apple fields from the hillside.

Abel's Apple Acres: Sells the largest variety of apple baked goods that I've seen so far, as well as candies and gifts. There are at least three places to buy food from, and there's attractions and vendors outside. Apple pies are relatively inexpensive here (at around $11-12 per pie, both baked and frozen).

Tip: Bring a map and figure out your route prior to heading over. It's easy to get lost out here, even with a GPS, and some of the signs for these apple farms are hard to see from a distance.

Wednesday, October 14, 2015

Americana Engine: Redesign


Minor (but important) differences in the script syntax from Beta 3 -> 5, especially for branching statements.

A number of changes have been made to the underlying code as well as scripting format in order to both improve readability and performance. Compiled maps from Engine Beta 3 or below* may not be playable since a lot of crucial triggers will not work properly, making Beta 4 the last official version for backwards compatibility. For more information on what may appear in Beta 5, see the changelog.

Brief list of changes:

  • All resources now load outside triggers instead of as actions.
  • Strings are now compressed for standalone maps
  • Map variables now include strings as well
  • Variable pointers are used at the beginning of a variable instead of extra values on an action
  • Jump Actions now made into If-Then statements by default
  • Locations were reworked
  • A lot of internal code was refactored

Next:

  • Faster map reloads
  • New GUI for terrain editing

Development Comments:

Loading resources were originally placed in triggers since there was originally enough of them would cause lag if they were placed at the beginning. After some consideration, not only does sounds and resources loaded in the middle of a map cause a few inconsistencies, they can also break some parts of a map if a trigger that loaded them happened to be skipped over for some reason, and another trigger loaded them instead. Additionally, loading in the middle will also lag for the time the texture or sound loads in realtime, and is more significant if the file being loaded is large. It's not going to make a difference in compiled maps, since all of the data is loaded at the beginning.

To centralize the location where all resources will be loaded, all resource calls are now outside triggers, and there should now be no question as to where these statements can be placed and if they will run or not.

Jump Actions were implemented because of the way the script was interpreted; You needed to get to a line, and there's a trigger to do so. Originally the jump statement required a number and optionally direction (up or down). During early stages of beta testing, users had difficulty with figuring out where these statements were jumping to, and most of the time was spent fixing issues and having to readjust the code every time a line was added in the middle. I also did not want to promote bad programming practices, and this one did it with spaghetti code. The problem was resolved with conditional statements instead. Jump to line is still there, just using labels now.

A bunch of code was refactored (and placed into separate source files) since it became progressively harder to add new features, and even more so to maintain. Prior versions placed most of the map rendering and editing functions in a single cpp file, and class definitions in several other header files. It was nearly impossible to split the main cpp file up as class methods pulled data from global variables. In larger teams, the same cpp file was being edited, which can get extremely cumbersome as all revisions from each commit had to be merged and reviewed so that it didn't cause conflicts and/or errors in the source file, as well as other classes referencing it.

The Battle Simulator in previous game engine releases is not compatible with the current engine version and will not be included in release builds, however source code for the map will be available as a separate download for anyone interested in updating it.