All posts by CanadaGoose

canada goose gear up outlet

As to why my email broke!
Today I found out that I wasn’t receiving email correctly. This was pretty distressing given I was awaiting the result from the first round of SVIP (Silicon Valley Internship Programme) interviews.

Over the weekend I switched my blog over to Ghost running on Red Hat’s awesome OpenShift platform. Before this, my domain name, ‘prydoni. us’, used to point to my VPS’ static IP and I had MX records set up for Google Apps Email.

To point my domain to its new home on OpenShift I needed to change canada goose gear up outlet to a CNAME record pointing at my sub-domain, since OpenShift doesn’t have static IP addresses. It turns out though, that CNAME records don’t play nice with MX records.

If a CNAME RR is present at a node, no other data should be present; this ensures that the data for a canonical name and its aliases cannot be different.

What seems to happen is the lookup ignores the MX records set up on the root domain, and instead looks for MX records on the host domain (in this case, the OpenShift sub-domain).

A simple enough workaround is to setup the root domain as a 301 redirect to a sub-domain that has the CNAME record. I already had http: //blog. prydoni. us with this setup, so redirected http: //prydoni. us to that and voila! Emails started coming in again! Looks like I am going wake up to a whole load of missed emails tomorrow though, awesome…

On the bright side, I got through the first round of SVIP interviews! Looking forward to hearing from the awesome startups I’ve been matched with!

I recently had an interview where I was asked to implement a key-value store with a twist, in a language of my choice. For straight-forward programming tasks like this, I like to use Ruby.

Since I can’t mention the actual problem I was given, I will describe a different, simpler problem to illustrate the power of syntactic sugar in Ruby. Let’s implement a key-value store that capitalises values (assuming all values are strings). We can make use of the built-in Hash library so that we don’t have to fuss around with hash functions and the like.

A simple implementation of the problem would be like so:

We simply keep an internal hash table, whilst adding our own accessors to handle the capitalisation of values. Again, we’re assuming that all values will be strings, so we can omit a type check.

We can now use the capitalised key-value store like so:

This is the general solution that one could implement in most languages. However, we can leverage Ruby’s syntactic sugar to make this more interesting. I’m just going to throw some code at you:

All we have changed are the method names. Hold on though… can square brackets really be the name of a method? How odd.

Let’s take a look at Ruby method naming conventions to understand a little more about what we’re doing here.

Method names may contain letters, numbers, an _ (underscore or low line) or a character with the eight bit set.
— Methods – Ruby Doc

The documentation goes on to say that method names may end in either:

An exclamation mark — to indicate that the method modifies the receiver

A question mark — to indicate that the method returns a ‘truthy’ or ‘falsey’ (All objects can evaluate to true or false) value

An equals sign — to indicate an assignment

In addition to this, method names can also be standard operators (+, -, *, / etc. ), but these only accept one argument. Unary operators can also be defined and are suffixed with an @ symbol. For added fun, we are also allowed the array lookup non-operator ([]), which is what we’ve used above.

All of these conventions can be seen in the built-in Ruby libraries.

The receiver, a, is modified directly. The non-exclamation version of String#capitalize will return a capitalised version of a without modifying it.

Returns a true or false value we can use in Boolean expressions.

Provides a setter for the default value returned when a key doesn’t exist in the hash table.

The binary addition operator with one argument.

Array lookup.

So where does all the syntactic sugar come in? If we think about the way normal instance methods are called, we can start to see that Ruby is doing something magicky under the hood for us.

Taking the last two examples, we can call these functions like so:

Ruby implements an object-message protocol such that method calls are actually messages to another object. These messages consist of a name and an (optional) payload. The payload is the list of Ruby Objects that are the arguments of the method.

Since method calls are actually messages, the methods themselves must then be the message handlers — the action that is performed when a message is received. Ruby provides the send method to invoke a message handler in an object.

So the above methods, can also be expressed like this:

However, doing canada goose gear up outlet this way can easily lead to some confusing code, and is not analagous to the way of doing canada goose gear up outlet in other languages. This is where Ruby’s syntactic sugar comes in, allowing us to transform the above into something more natural:

This is more in line with what we see in most other languages, but the important point to take away from this is that Ruby gives us the power to define our own methods that can take advantage of special syntax.

This is an extremely important and useful feature. It allows the programmer to build an API for their objects that conforms to the overall language design. In the FancyCapitalHash example, we can expose the same syntax as the built-in Hash class so as to provide a drop-in replacement.

In more traditional languages, one could implement the assignment syntax using properties (setters), much like attr_accessor does. However, we can apply the assignment syntax to any arbritary method in Ruby — even ones that don’t actually assign anything if we wanted to! This flexibility is one of the reasons why Ruby is home to many DSLs (Domain Specific Languages).

Ruby is simple in appearance, but is very complex inside, just like our human body.
— matz

The importance of creativity in web development was emphasised recently in one of my Web Technologies lectures.

You need technical skills for web work, to know how to do things. But you also need creative skills, to know what looks and feels good.

This seems a bit obvious at first; the frontend is what our users see, and so it needs to look appealing and instantly friendly to use. However, frontend technologies are becoming increasingly complex. With the advent of HTML5 and modern JavaScript tools we are able to do more on the client side. To support this, we now have access to powerful debugging capabilities built directly into our browsers. In essence, it seems that the frontend is becoming more of a technical playground than it is a creative one.

As the complexity of JavaScript applications increase, developers need powerful debugging tools to help quickly discover the cause of an issue and fix it efficiently.
— Debugging JavaScript – Chrome DevTools

Complement this with the multitude of CSS frameworks available to us now, making it easier for developers to design semantic websites by conforming to well thought-out standards. This is more in line with traditional desktop/mobile application development paradigms; standard libraries with standard components. I have already spoken about how useful this can be for developers, standards are a good thing. They allow users to become familiar with the components of a web page through uniformity. However, does this not impact our creativity?

It’s not fair to say that every website built using a framework will look like the scaffolding the framework provides. The point is to customise to the look and feel you want, whilst still making use of a set of standard components. Going back to the mobile/desktop application analogy, all apps use the same user interface APIs whilst also being visually different from other apps. However, it makes it very easy to fall into a trap where it’s easy to ignore customisation of the look and feel. It already looks great with little to no effort, why s.

canada goose kensington parka canada for sale

Spouse and children Feud: Havana compared to. Las Vegas from the 1950s. Component 2
The truly great Havana making boom connected with 1956-1958 noticed the completion in the biggest, most expensive hotel-casinos outside Las Vegas. First that canada goose kensington parka canada for sale are erected appeared to be the glimmering Hotel Capri, today’s 19-story edifice with all the novelty of your rooftop pool.

The Capri’s on line casino was fronted because of the actor George Number who experienced built his / her career trying to play gangsters and at the ready with these folks, such since Benjamin “Bugsy” Siegel.

Nonetheless, the Capri’s actual owner appeared to be Santo Trafficante, Jr ..

Next to seem was Meyer Lansky’s mega swank Inn Riviera any 21-story, 440-room work of art of Miami Current design positioned directly to the Malecon dealing with the seaside.

The continue and most significant was that Habana Hilton built-in Havana’s Vedado amusement district in addition to visible through any vantage point from the city.

Living Magazine’sMarch twelve, 1958 concern featured that article “Mobsters Enjoy canada goose kensington parka canada for sale On Stressed Havana in addition to Split Abundant Gambling Income with Batista. ” That piece precise the Havana video gaming scene, identifying the mob’s essential investors which includes Vegas’ Moe Dalitz in addition to Wilbur Clark. The impact left by using readers was than a glittering fresh Las Vegas experienced suddenly arisen from the Caribbean, and was your handmade jewelry of opponent professionalism nurtured by just a corrupt govt.

Life additional reported which, as effect of the on line casino boom, Americans were being flocking since never before into the island as canada goose kensington parka canada for sale move average Habanero appeared to be left wondering the wisdom in the Batista-mobster relationship for Havana’s foreseeable future.

By the final of 1958, that Habana Hilton in addition to Havana Riviera were being bigger compared to any hotel-casinos nonetheless constructed within Las Vegas.

In on the list of grand ironies from the mob’s Havana investment funds, in 04 1958, nine weeks before Batista fled the united states, the The state of nevada Gaming Mother board declared which no members of The state of nevada gaming licenses may possibly also be buyers in Cuban casinos. The decree was a reply to that opening connected with Havana’s major new hotel-casinos, which often, along with all the expansion connected with gambling through the entire island, was working with a measurable affect Las Vegas’ video gaming receipts. High rollers were being choosing that diverse pleasures in the “Playland in the Americas” more than Nevada’s remote computer repair and dusty place.


or even this…

In addition in 1958, Moe Dalitz experienced taken control in the Stardust Inn, and this individual and his / her partners were being still that owners in the Desert Inn. So Dalitz experienced his fingers full whenever he appeared to be forced to select between Havana in addition to Las Vegas which same 12 months.

As an effect, Hotel Nacional on line casino investors Moe Dalitz, Sam Tucker, Morris Kleinman, in addition to Wilbur Clark, who were being all deeply focused on the achievements of Las Vegas, opted to market their Inn Nacional stocks (at a large profit) to be able to Meyer Lansky.

The tumble of Batista and also the arrival connected with Castro spelled the final of that mob’s investment funds in Cuba. To the day connected with Batista’s reduction, the casinos were being smashed in addition to looted.

In addition to what turned of Moe Dalitz in addition to Wilbur Clark? They will became top citizens connected with Las Vegas, the fathers in the entertainment capital in the world.

In addition to Lansky?