One day a man was watching his wife prepare a turkey for the Thanksgiving feast. She got out her 5lb pot, reached for her 10lb turkey and immediately trimmed off half of the meat from the turkey. She then proceeded to forcibly stuff the turkey into the pot – meeting with resistance and having to lean into it to get that turkey to fit into that pot.
Curious the man asked “Why do you prepare the turkey this way?” to which his wife responded “Well it’s the way my mother does it and it’s the way I have always done it for 10 years now”.
The next year with a new grandchild the couple decide to spend Thanksgiving with her parents. The time comes and the man watches the grandmother get out the 5lb turkey and a 5lb pot proceed efficiently to put the turkey into the pot and put it into the oven. He asked why she taught her daughter differently which she responded “Oh the market was all out of 5lb turkeys that year so I got a 10lb one”.
Seek to understand why we are doing what we are doing, don’t assume the standard course is the best direction.
That of course sent me on a dizzying hunt for resolution. I got it working by editing the “msvc9_support.py” file to not use the registry and use just the path where I found vcvarsall.bat on my computer:
productdir="C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC"# Reg.get_value(key, "installdir")
Elegant? Eh probably not, Utility? perhaps. But it does work and after that I was able to install flask-bcrypt.
Hopefully this will be a start of something new and exciting – or another thing for me to procrastinate about. I have tried several times before to blog consistently I just get, well, sidetracked.
My intention is to blog stuff that I don’t want to forget or stuff that I want to share. Most things I would expect to be of a technical nature but I suspect that sometimes I will want to post something for the ages to remember my wit and wisdom (read; me ranting about something inconsequential).
Part of being a developer is pushing yourself to learn and use something new. So I decided I would take a language I am familiar with and do MVC in it (as I do ASP.NET MVC in C# daily at work). I looked at several MVC frameworks for Python but decided upon Wheezy.web
After playing around with Sublime Text 3 for about two hours I decided to get a license; and frankly its rare I actually pay for something that there are many FOSS alternatives. Sublime Text 3 is just that good. Yes really, that good. Highly recommend you setup “Package Control” for Sublime Text it makes installing packages a breeze. I used this blog post and installed Anaconda for syntax completion.
This is using the built-in “Sunburst” theme along with the “Dark” Sublime Text layout. It’s a thing of beauty. Here is my “User” config setup :
I guess getting older sitting around watching and listening to people (especially on Facebook) is taking a toll on me. It’s difficult to sit and watch and listen to friends and relatives promote toxic behavior all in the vein of “Righteousness”. This rambling is my opinion (mixed with some King James bible quotes).
I was reminded of this today and thought it was awesome. “Judge not, and you will not be judged; condemn not, and you will not be condemned; forgive, and you will be forgiven” – Luke 6:37.
How great would it be if everyone realized we are all fallible, (“Do nothing from rivalry or conceit, but in humility count others more significant than yourselves.” Philip 2:3), and our love and respect for others is a reflection of who we really are.
The adherence to the “Golden Rule” shouldn’t be an elective – “So whatever you wish that others would do to you, do also to them” (Matthew 7:12). It should be mandatory, if you treat others not how you want others to treat you that makes you a hypocrite – and generally not a very endearing person to be with.
No matter your beliefs; some of us are Christians, some are Deists, some are Hindi, some are Jewish, some are Atheists. Everyone initially deserves being treated with respect; its that followup of how they respond to you which you can react (remember are you looking out of the bowl or is someone watching you from outside the bowl – your actions speak louder than your words). Initially don’t presume because they appear different than you that you are better than them – or nicer, or have more money, or whatever.
Try to remember this much. Your right to say whatever it is you think is right, and do whatever you think is right (obviously within legal limits) is equal to those rights of others. If you don’t think that equality exists – your effectively breaking the “Golden Rule”.
TL;DR; Be nice to others even when you don’t agree. No-one wants to deal with someone who intentionally wants to cause emotional damage. Everyone is fallible.
On the hunt for a new TV during the 2013 Black Friday madness I saw that TigerDirect had a normally $499 TV for $299. Seemed a great deal and the convience of getting it shipped directly to my house wihout having to deal with waiting queues.
So I thought.
The first TV arrives, I gleefully unpack it and set it up – oh so shiny. Turn it on an experience a true “ah shit” moment. A crack in the lower right corner about 4″ in length. Sigh… So packed it up contacted TigerDirect got an RMA and sent it back. Another week I will wait for my exchange process.
The second TV arrives. I again with much excitement anticipate the elusive OOB experience and unpack the TV. But wait, the cords are not just right. They are not perfectly machine liked rolled together they are more like wrapped around themselves like someone put it together in haste. Humm. Oh well keep going I say to myserlf, ah, where is the remote. There isn’t a remote in the box. I must have missed it, turn the box over look under the packing thingies. Damn it! Moving my hand around the TV I realize there is only a single button as well – a power button. Well suffice to say its an experience trying to change the input and do the initial setup without a working remote. I ultimately was lucky enough to find a Uverse Remote Code that controls the TV just enough to work the menus and toggle power.
So back to my computer to contact TigerDirect thinking (obviously foolishly) that I would just ask them to send me a remote to go with this obviously returned (most retailers call that sort of merchandise an “Open Item”) TV.
The online chat button brings this conversation;
Please wait while we find an agent to assist you…
All agents are currently busy. Please stand by.
You have been connected to Relvin Borbolla.
Relvin Borbolla: Thank you for contacting us today, how may I assist you?
Steven Hildreth: Hello I ordered a TV, it came it was cracked. I got RMA sent it back received second TV – it was an open item and does not have a remote.
Steven Hildreth: I don’t think its fair that the second TV sent to me is an Open Item, I didn’t order an Open Item and I don’t know why its Ok to send an Open Item as a replaced for a defective item.
Steven Hildreth: It’s nearly impossible to use this TV without a remote.
Relvin Borbolla: Please contact the manufacturer directly at (800) 701-0680 for further assistance in order to get a remote.
Relvin Borbolla: We apologize for any inconvenience.
Steven Hildreth: Uhm wait, the item sent to me from TigerDirect is a return of someone else, the manufacturer isn’t going to help me as its not their issue.
Steven Hildreth: Its TigerDirect’s problem, as they sent me the TV without a remote.
Steven Hildreth: The second TV was clearly a return as the cords were not in original packages.
Relvin Borbolla: So you want to return it for a replacement again?
Relvin Borbolla: Unfortunately, we do not carry the remote for this item.
Relvin Borbolla: That is why you need to contact the manufacturer for the assistance.
Steven Hildreth: So I have two options; 1. Send the TV back to TigerDirect a second time to get a third TV that has a remote or 2. Purchase a TV remote (which should be included with the TV and would be if TigerDirect wasn’t sending out returned incomplete merchandise). Is this correct?
Relvin Borbolla: We can still process a return for an incomplete item for a replacement.
Relvin Borbolla: You can contact first the manufacturer in order to get a remote on
this item so you cannot return the item and wait for the replacement in 2-3 days.
Relvin Borbolla: Is there anything else I can assist you with?
Steven Hildreth: No you have helped me realize why I should not
solicit TigerDirect in the future. I will purchase a replacement remote on my own. Good day.
So to recap; TigerDirect thinks its Ok for them to replace a defective item with an returned (read: used, returned, “Open Item”) and seemingly an incomplete returned item at that. Furthermore its also Ok that when the customer calls asking for the missing pieces of the item to tell them to contact the manufacturer or return the item again (how lucky do you feel?).
With the likes of Newegg, Amazon and Best Buy I personally will not bother TigerDirect again to have to deal with seemingly unreasonable expectations with customers.
I decided that when I installed Windows 8.1 I was going to give Internet Explorer 11 a try. Put aside my historical prejudices and see if in fact IE11 is a better IE. Well I used it as my exclusive primary browser for 30 days on my home machine. No Chrome and no Firefox (other than developing against, yay! Firebug).
That’s right I said it, IE11 isn’t the scourge that IE once was, and in fact I will go so far to say that IE11 is actually a decent browser. If your wondering “well if its not so bad why are you going back to Chrome?”.
Simple IE11 has improved the experience for the user when surfing the internet when using Internet Explorer, however its still IE. What?! Meaning the internet is still written to handle IE in a “different” way. Several websites have IE specific coding and CSS layouts because of the IE of yesterday. It’s a real pain to have to add a site to the “Compatibility View Settings” so that IE11 renders that page like IE10 – just to get the page to work.
Why do I like Chrome better than Firefox? One simple reason: it syncs better with my Google account. I use Chrome on several computers and its awesome to have my bookmarks, passwords, history synced up across those machines – and to have that all linked with my Google account. I know Firefox has a sync capability but its with Mozilla and frankly its not as slick as the integration you get with Chrome and Google.
I had this idea that I would make a new site using Pylons as the framework. So I headed over to www.pylonsproject.org and I see that its no longer Pylons its Pyramid. Ok so be it.
Well download the doc and I find out the Pyramid guy doesn’t seem to like MVC for web development, eh?:
You Say Pyramid is MVC, But Where’s The Controller?
The Pyramid authors believe that the MVC pattern just doesn’t really fit the web very well. In a
Pyramid application, there is a resource tree, which represents the site structure, and views, which
tend to present the data stored in the resource tree and a user-defined “domain model”. However,
no facility provided by the framework actually necessarily maps to the concept of a “controller”
or “model”. So if you had to give it some acronym, I guess you’d say Pyramid is actually an
“RV” framework rather than an “MVC” framework. “MVC”, however, is close enough as a general
classification moniker for purposes of comparison with other web frameworks.
So right off the bat i got a bad taste as I personally *LOVE* MVC and I cannot understand why anyone with any real experience in using it would say otherwise in a decent size web application.
At any rate I start to get into Pylons, er excuse me Pyramid, kudos to that team for some great documentation. After reading, perhaps browsing is better stated?, the 700+ page PDF I decided its not really the framework I would use in any production environment.
Why? Well several things struck me as very odd;
1. The author of a web framework doesn’t like MVC – yea really that’s a big deal for me.
2. Since its not using “controllers” per say its a bit confusing the “routing” – again a hangup for me with my MVC heavy background.
3. Too many choices. Yes really this is a complaint. I say this as the docs point out 3 ways to do something good, but really nothing done well. I rather take an opinionated stance and show how to do what you think is best – well.
4. Seems either over enginered or just complicated by the many config files; setup.cfg, *.ini, setup.py.
5. Static asset routing seems really odd. I guess I expect to just set a route to a path and that automatically serve requests for objects in that view. Meaning I would expect “/favicon.ico” is served via a route setup pointing “/” to a folder – not having to setup a static route for every file.
Its an interesting framework, just not for me. I kept reading the documentation thinking – this would be so much easier and cleanly implemented in MVC.
Well I have decided to try to learn Ruby and see what I can create with its web frameworks (something like Sinatra or even Rails). So I picked up a couple of books and started reading.
So far here are my (read; from a long time C# developer) Ruby take aways.
* Class inheritance is single (like C#) but you can include unlimited number of “modules” as you like
* All Classes are partial.
* Basic built in classes is small set; Fixnum, Bignum, String, Range, Array and Hash
* Several of the “methods” do different thing based on case, ie “%w” and “%W” string delimiter – eek
* The inclusive and exclusive range of “..” and “…” is well weird.
* True, False, “0” and “1” are all logically “true” and only nil is “false” – uhm wow; this seriously tweeks my head.
* An array can contain any type (or object) which means “Array” is like Dictionary
* .freeze will let you make a class that cannot be modified – but evidently you will be ostracised by the Ruby community for using it.
* Class “Attributes” are like Clas Properties.
* The distinction between “@variable” and “@@variable” is that the single is instance variable and double is class variable (persists, think const).
* Methods (code that is def … end) doesnt need a “return” it magically returns the last value in the method. This is very strange to me as I want to see the “return batman;” – syntactical sugar I realize.
* Mixin method inheritance call is seemingly backwards from constants in their order of location. Is this just to confuse people? Seems like it to me.
* Same as JS with the ‘==’ and ‘===’ comparison operator. I wish C# had this operation as succient as this. The “is” and comparision of typeOf works but isnt as clear.
* “Unless” conditional statement is interesting. Its like reverse of an “if”.
* Statement modifiers are nice, but I can see it being confusing as its the logic to perform the statement after the statement, but it does make for succient code.
* Case statements dont have “fall through”
* “while” and “until” are opposite. “while” loop is as long as the condition is true, and “until” is until the condition is false.
* “for” loop is like “for each” in C#, meaning you get a local variable in the loop scope for iteration through a variable collection.
* “rescue” is like “catch” in exception handling
* “ensure” is like “finally” in exception handling
* “raise” is like “throw” in exception handling
* Exceptions bubble up the stack if no “rescue” handler is found – exactly like C#
* For a class definition the “<" is the same as ":", ie "class MyError < RuntimeError" same as "class MyError : RuntimeError"
* Class method "initialize" is same as "~"
* Using the "File.Open ... end" block is like a using() statement, in that the File is closed on block exit.
* Threading is much simplier in design in Ruby over .NET threading - much.