Posts

Showing posts from February, 2014

Penguins Rising: Caching in Google App Engine

Image
      One day while I was exploring Google's Page-speed Insights to determine whether there was anything I could possibly improve with Penguins Rising. I discovered that I was not  Leveraging the browser cach e . Up to this point the only type of caching I had done was with the HTML5 cache manifest, however  this was  different than what Page-speed insight was advising me with and this was also what lead me to my question that is the  majority of what this article is about .        Question Lucky for me, I am not the only person to have asked this, but " What is the difference between a Cache Manifest and a Cache header? " As it stand with Page-speed Insight my current results with  Penguins Rising (will vary)  as you can see for yourself. Using Expiration in the Content Header You can set the expiration time however you like, I tested my application with 10 minute expiration date. //Inside the app.yaml default_expiration : " 10m " An Ex

Coursera: Gamification Notes

    Gamification is not turning everything into a game but changing the user's experience to be similar to one. It is not the same as  Game theory  and is about recognizing the point of fun. In short it is parts of a game but without the full blown version in the user's face. From the definition of Gamification it can become some difficult to understand the differences from a game. So I ask myself what is a game or how does it explain more what gamification is?   Unfortunately this question is a little more philosophy than a cut and dry answer, but a few people have tried. Such as Bernard Suits who puts it into these terms... Terms Per-Lusory Goal Constitutive Rules Lusory Attitude Voluntarily overcoming unnecessary obstacles. Characteristics of games     Participation is voluntary     Players work towards achieving an objective     There are rules defining how the objective can be reached. Pyramid of Elements (Top to Bottom) Shows variety of options and lowe

Setting up QunitJs for Asp.net MVC Debugging

    Using  QUnit  is important for me on some of my projects that are more front-end driven. So developing, debugging and testing all need to happen in javascript but without being in the final production. One thing I do not want to do is include the QunitJs in my bundles and would serve no purpose because the bundling and minifying does not happen for debugging. Instead what I did was create an extension method and return a bool, like the one shown in the resources. //Location ../Helpers/IsDebugging public static bool IsDebugging(this HtmlHelper helper) { #if DEBUG return true; #else return false; #endif } //Location ../Views/Shared/_Layout.cshtml //These two files are not apart of any bundled packages. @ if(Html.IsReleaseBuild()) { @ Scripts.Render( "~/Scripts/qunit-1.14.0.js" ) @ Styles.Render( "~/Content/qunit-1.14.0.css" ) } Side Notes The intellisense will do some weird things with the coloring for code inside the else sta

My Python Experience

    I was first introduced to the Python during my first year of college. However sadly it was not the focus of the class and it was only added as a extra piece of material. The class, I was took was more focused around pseudo-code or basic programming concepts and the professor just added the book Python Programming: An Introduction to Computer Science by John M. Zelle  for students who had no programming experience prior or to those who would like to use their pseudo skills in programming language. I had no prior programming experience but I also had little time during college to complete extra work on top of my two jobs and full college semester. I did try to read in between semesters while I worked the phones at my desk job which had me handling IT calls but it was just impossible to do. Once I completed college I had experience C++, C#, Java, and almost everything else so I felt it was time to return to Python.     With all my new skills I felt getting Python under my belt woul

Research on JQuery Editable Table Plugins

    My goal here was to find or create a jquery editable table that I could custom to my needs with a little or no work and helpfully be easy to maintain. I also wanted to make sure that what I chose would not impact how I implemented my back-end. The following is the basic a starting point of what I am working with but not limited to... <table class = "table table-condensed" > <thead class = "storage" >< / thead> <tbody>< / tbody> < / table> From this point I would pull my table data in by either a model binder or simply create the table via ajax and appending it there. Still is without looking at how a plugin is design or needs to be setup so I might have to look at that before I begin implementing which I got with. I started my research by listing what I was looking for and what I thought I might have to customize. My Requirements  Input check for duplicates. character input limiting (no more than 12 c

Using Entity Framework and a Storage Procedure with Parameters

    So I was stuck sometime ago on a problem I had where I was using my sql store procedure with the Entity Framework. Eventually found what I needed and the purpose of this article is just to write out a small example. I've come up with  multiple  ways to achieve the same thing now but this is the most basic form of it. public IList<KeyValuePair> GetIds (string id) { using (var db = DBFactory. GetDB ()) { return db.Database.SqlQuery<KeyValuePair>( "EXEC db.MyDatabase @id", new SqlParameter("id", id)); } } Resources How to pass parameters to DbSet.SqlQuery Method in Entity Framework How to use DbContext.Database.SqlQuery (sql, params) with stored procedure? EF Code First CTP5 The data reader has more than one field. Multiple fields are not valid for EDM primitive types KeyValuePair(TKey, TValue) Structure (System.Collections.Generic)

Introduction to Hadoop and MapReduce Notes

Image
Class Listing on Udacity What is   big data -  a subjective term but mostly large amount of data that is usually difficult to be processed on a small machine not  necessarily  large amounts of data. Challenges  with data are that data comes in really fast and from multiple places. The three V's  Volume, Variety, Velocity References When to use HBase and when to use Hive - Stack Overflow Apache Flume – Architecture of Flume NG | Cloudera Developer Blog CDH  -  distribution of Apache Hadoop and related projects. Hadoop Streaming Hadoop Storing format. Introducing Parquet: Efficient Columnar Storage for Apache Hadoop | Cloudera Developer Blog hadoop - Storage format in HDFS - Stack Overflow Terms NameNode    MapReduce   Shuffle and Sort   Apache Spoop    Apache Nutch    The Final Much of this information below is on a Google doc that was some what hidden in the course wiki but not provided on the final's instructions. The doc can also be found

Nexus 7 Not Appearing Over the USB

Image
    This should have been a easy setup but since I ran into a few problems that weren't simple nor obvious I thought I would share and record my notes. For much of my android development I use the ADT Bungle for Windows , I have the Android Studio Development but just playing out with it. Regardless the problem with my setup was my Nexus 7 not appearing. At this point I had already gotten the debugger mode enabled and the usb connected but still 'adb' is not seeing my device.      Simply put the Nexus 7 by default (for me at least) was set to MTP and if you can see the connection mode notification can change it from there to PTP. The notification for me appeared briefly, so what I did was have the notification bar open as I plugged in my nexus. Notification will appear below USB debug Unchecked MTP and Check PTP The first link you below holds the location where to install drivers for your windows setup which you might need to know for when you switch from

HTML5 Audio doesn't Autoplay for Chrome on Android

    Recently I was playing Penguins Rising on my nexus 7 and notice that the background music wasn't playing but strangely all the other sounds were. After a hard look at the code, I found no reason for the audio not to be work. So I could tell right away this wasn't going to be an easy fix. The first thing I did was check the support to see if   the HTML5 audio element  had any support issues. Since the support for the audio element seemed to be alright with what I was using, the next thing I thought was that it must be the attribute  autoplay . Its important to note that I am also using the loop attribute but I will return to that later. Example from Penguins Rising < audio autoplay loop > < source src = "content/ArcticWind.wav" type = "audio/wav" > < source src = "content/ArcticWind.ogg" type = "audio/ogg" > < source src = "mp3/ArcticWind.mp3" type = "audio/mpeg&qu

An Introduction to the Hero Engine

    The Hero Engine was actually the first Game Engine I was introduced to, and to be honest I really didn't get into it very much just because I didn't quite see the point of a license agreement. I also had wanted do things my way and  does but with all the extra lifting for you with media content for the most part. I will be skipping the installation part since for me it was very specific with files and such, and I didn't encountered any problems.    After everything has been installed I started from:  How to write a script  and then going moving my way up to writing  Your First HSL Script . In the documentation it was recommended to attempt or understand the server side script and be taken along side with the client side tutorial. However I skipped the server side tutorial since I already knew the methods behind it. So far from what I've seen and done, I consider the Hero Engine to be pretty much in the same perspective as a browser but of course with a lot more f

Popular posts from this blog

UI-Bootstrap Collapsible Sticky Footer

Installing Windows on Acer chromebook 15 cb3-532

Aspetcore: NLog with Postgresql