{Super-Geek developer post below. Skip for your own mental health}
So, EveryMove is my first project using MVC (Model-View-Controller). I'm pretty sure it wasn't invented by Ruby-on-Rails, but RoR made it "popular". My weapon is ASP.NET MVC 3. I'm actually using a subset of MVC named by Microsoft MVVM (Model-View-ViewModel). No need to explain what it is for rant below, but the only thing you should know is that it requires 3-pieces to render a single page: A Controller, a Model (or ViewModel) and a View.
It's a wonderful way to separate pieces in the code to build large websites, but my problem is how Microsoft decided that MVC should be split into different folders. So you have a folder called "/Controller", a folder called "/Models" and a folder called "/Views". Inside of the "/Views" folder you have sub-folders for each controller you implement.
Now picture this: You want to add a new field to the sign up form on your website. It requires you to open and edit 3 different files. Not only that, but those files are not close together in the folder structure, they are in 3 different folders. If you use the shell or the command prompt, you still need to do quite a bit of navigation to open all three and edit them.
I'm not a genius by any means, but my previous startup used my own made-up MVC model. The difference was that 100% of the code was on the same file. They still would use different methods, but it was on the same file. So, renaming a field, adding something to the UI or a new page, require opening and editing a single file. It was very productive.
I can't do this with ASP.NET MVC. Actually, I could, but it would be unnatural to the way things are setup, both on the environment (Visual Studio) and for the conventions used by MVC/Razor/.NET.
I'm all in favor of productivity, and I think Microsoft made the wrong productivity choice for developers adopting this convention. As I searched for best practices on how to organize large projects on the web, I've found more people complaining about the same thing. Once you have a few dozen controllers, hundreds or thousands of views, you'll also need hundreds or thousands of ViewModels files, and these are very small files, a few dozen lines. It feels like a huge waste of keystroke and clicks to me.
Wednesday, June 22, 2011
Thursday, June 9, 2011
You're doing it wrong: QR Code edition
So... There's this thing, called QR Code... Never mind. Every single place today has QR Codes. Magazines, billboards, restaurants, T-Shirts, product boxes, etc.
I think there are lots of smart ways to use QR Code and lots of dumb ways to use it. But this is not what this post is about. I want to pick on a "small" technicality of QR Codes. Their resolution!
Recently I was what an event and someone wore a T-Shirt with a QR Code on the back. I could guarantee you no QR Reader would be capable of scanning that QR code because of its high-resolution (high dots per inch) and because the waves the t-shirt was making.
Let me start by showing two QR Codes, let's see if you can spot the difference:
OK, this is hard, I know. Go ahead and scan those to see what happen. What? They are identical? Yes! They are identical. Both take you to exactly to the same place, this blog post on Seattle 2.0.
But you can see how the right one is more fuzzy and detailed than the left one, right? If this is on a piece of paper or at the side box of a product, there might not be a problem since they won't bend and twist, but if that's on a T-Shirt, or on a rough surface, or on a sticker that might get bended just a little when placed, the left one is a much better choice because the QR detection will be using bigger pixels (you can see how the squares on the left are bigger than on the right).
So, what's the magic? Simple. The right one (more likely to give you a problem scanning it) links directly to the URL on Seattle 2.0. The right one, links to a URL shortening service (http://bit.ly/kI4vVk). Because the URL itself is so smaller, the QR Code needs less "dots" to describe it. QR is just an encoding mechanism for characters. This means more characters, more dots; less characters, less dots. On this case, less dots is better.
Do you want to get even sweeter than that? just add ".qr" to the end of the Bit.ly URL and you'll get your nice low resolution QR Code... http://bit.ly/kI4vVk.qr
There might be a 100 reasons for people to think you are clueless, this is one less for you to have to worry about it.
I think there are lots of smart ways to use QR Code and lots of dumb ways to use it. But this is not what this post is about. I want to pick on a "small" technicality of QR Codes. Their resolution!
Recently I was what an event and someone wore a T-Shirt with a QR Code on the back. I could guarantee you no QR Reader would be capable of scanning that QR code because of its high-resolution (high dots per inch) and because the waves the t-shirt was making.
Let me start by showing two QR Codes, let's see if you can spot the difference:
OK, this is hard, I know. Go ahead and scan those to see what happen. What? They are identical? Yes! They are identical. Both take you to exactly to the same place, this blog post on Seattle 2.0.
But you can see how the right one is more fuzzy and detailed than the left one, right? If this is on a piece of paper or at the side box of a product, there might not be a problem since they won't bend and twist, but if that's on a T-Shirt, or on a rough surface, or on a sticker that might get bended just a little when placed, the left one is a much better choice because the QR detection will be using bigger pixels (you can see how the squares on the left are bigger than on the right).
So, what's the magic? Simple. The right one (more likely to give you a problem scanning it) links directly to the URL on Seattle 2.0. The right one, links to a URL shortening service (http://bit.ly/kI4vVk). Because the URL itself is so smaller, the QR Code needs less "dots" to describe it. QR is just an encoding mechanism for characters. This means more characters, more dots; less characters, less dots. On this case, less dots is better.
Do you want to get even sweeter than that? just add ".qr" to the end of the Bit.ly URL and you'll get your nice low resolution QR Code... http://bit.ly/kI4vVk.qr
There might be a 100 reasons for people to think you are clueless, this is one less for you to have to worry about it.
Wednesday, June 1, 2011
Hey Amazon, how about the “Green Shipping” option?
I buy a lot of stuff from Amazon. Primarily books, but I also buy electronics, toys for the kids, things for the house or car, office supplies, etc. Most of the time, I get them in the two-day delivery by clicking on “Two-Day 1-Click – Free”. That’s because I have Amazon Prime (free two day shipping) and I have enabled the 1-Click purchase option.
My problem is that I’m slightly more self-conscious of clicking that button because when I buy a book in the morning, due to Amazon efficiency, it will be shipping 30-minutes after my order. On the afternoon I decide to buy another book and 30-minutes later it’s on its way as well. Awesome! Except by the fact they are using two different boxes, have created more wasted products (invoice, packing, packaging, truck delivery, etc.).
I wish Amazon had a button called “Green Shipping”. The idea is simple and similar to Amazon Tote (a service they tested in Seattle and they canned it): Every time I press the “Green Shipping” option, my order is rolled up and delivered to my house once a week. Ideally, I’d like orders posted until midnight Wednesday to appear at my door step by Friday end of day, but I think each person has a different need, so maybe Amazon can give us a knob to control which day is the cutoff for shipping.
If I need something urgent, on a Monday, I’ll just use the One-Day shipping anyway, but if I’m not in a hurry, I don’t mind a few more days here and there to get my order and it’s likely to make me feel less guilty about those UPS trucks stopping by my house.
My problem is that I’m slightly more self-conscious of clicking that button because when I buy a book in the morning, due to Amazon efficiency, it will be shipping 30-minutes after my order. On the afternoon I decide to buy another book and 30-minutes later it’s on its way as well. Awesome! Except by the fact they are using two different boxes, have created more wasted products (invoice, packing, packaging, truck delivery, etc.).
I wish Amazon had a button called “Green Shipping”. The idea is simple and similar to Amazon Tote (a service they tested in Seattle and they canned it): Every time I press the “Green Shipping” option, my order is rolled up and delivered to my house once a week. Ideally, I’d like orders posted until midnight Wednesday to appear at my door step by Friday end of day, but I think each person has a different need, so maybe Amazon can give us a knob to control which day is the cutoff for shipping.
If I need something urgent, on a Monday, I’ll just use the One-Day shipping anyway, but if I’m not in a hurry, I don’t mind a few more days here and there to get my order and it’s likely to make me feel less guilty about those UPS trucks stopping by my house.
Subscribe to:
Posts (Atom)
