I've been reading about this new-fangled thing called Hypermedia API's. Apparently, this comes as a result of REST failing and now we need something even newer. A hypermedia API isn't really anything new, just as REST wasn't anything new. The problem stems more from the fact that few people actually understand what they have on their hands and how to use it.
My cursory understanding of a Hypermedia API is that it does for web based API's what HTML did for Documents on the web. IE, in theory it makes an API self descriptive and navigable, the way an HTML website is - you can point a generic content consumer (browser in the case of HTML) at it, and its viewable and usable by a human. Simple things like using URI's instead of some internal ID number to refer to other resources (like a simple link in HTML) or some kind of known data structure to define the inputs to a resource (HTML FORM).
That's all well and good, and in many ways useful to do. But API's aren't consumed by a human, but rather another machine. So the analogy of saying Hypermedia API's are like HTML is kinda wrong. And its not going to work just like that. I like what David of Ruby On Rails fame has to say about it.
I think the real problem here is the same reason why REST (and various frameworks) often fails, and that's because of a misunderstanding that goes back many years; that of the Model. That's the M in MVC and I think too many people get it wrong. These days, Model usually means "Database record". So, its natural when you take a typical modern framework that makes Model synonymous with Database and make a "REST" API where its doing not much more than just exposing those models and a CRUD interface. But thats not REST - REpresenational State Transfer. Thats just tunneling your database to the browser.
See, models, in the original MVC, were meant to be just that.. models. Not the real thing as internally manipulated by arcane code written by programmers who think that way. Models, as in, a conceptual way of viewing something. Typically, a way of viewing something that makes sense to the typical person who might be using the system.
That's what make HTML so great. Anybody could come along to a website, and view it. Anybody could quickly learn to click on hyperlinks to find more stuff to view. Its not so much that the HTML describes itself and how to interact with it (even though it does to a degree). Its that the HTML was (if it was done right) designed to be used by a human.
API's are typically not designed for a human, right? So our brains fall out of our heads and we just offer up direct versions of database objects. But that's not right. What happened to the REpresentational part? Just because it's API doesn't mean it can't make sense to an end user. Isn't that kind of the point of API anyway? To provide an abstraction to your data?
REST implementations fail often because they are not providing representations of the internal data, nor do they provide much real state other than the HTTP verbs. So Hypermedia API was "invented". But people are still serving up literal translations of database tables instead of coming up with sensible, intermediate Models that make sense to the consumer of the API.
This is also aside from the fact that people also get the V in MVC wrong. Views were never meant to be these statically defined immutable bricks that fit perfectly to the model. They were supposed to be ephemeral things that were created on the fly as needed to present the model to the user under the guidance of the controller. Most MVC frameworks get it all wrong.
So in summary, you're doing it all wrong! Lets stop arguing about REST and Hypermedia API's and thinking these tools will fix our problems, when really the problem is more about the data we are trying to let a user manipulate. If we get that data right, that Model, the rest will come.
What The F?
Web Design, Programming, and random ramblings.
Sunday, March 3, 2013
Thursday, November 1, 2012
Chili Recipe
I entered the chili cookoff again this year, and lost. Although I came in like 5th place, I still had people ask me for the recipe. Which of course, I didn't write down.
So let me retrace my steps.
First, you're going to need meat. And spices. So, I picked up 2 lbs of lean ground beef and a pound of sweet italian sausage (not links, just ground sausage that looks just like the ground beef). I got these at Henry's. While you are there, get a package of baby bella mushrooms.
For spices, I got ground cumin from somewhere in a little baggie. I got whole dried chili pods in bags, both California and New Mexico. I had trouble grinding these up, though. First I tried my nice burr style coffee grinder, but they were too light-weight to fall into the grinding blades. Then I tried the blender (a Ninja). That didnt work real good either, I ended up with flakes and not powder. I used it anyway..
You'll also need some tomatoes.. I used two small cans of Ro-Tel. I like beans, so I used a small can of Sun-Vista pinto beans.
Rounding out the ingredient list is 2 shallots (these look like small yellow onions) and a garlic bulb.
Here's the preparation (because just throwing it all in the pot is too easy).
First, brown 1 pound of beef and the pound of italian sausage, and drain off the fat. Put this in the slow-cooker.
Finely chop the mushrooms (and finely as you can), shallots and garlic. Then, put a tablespoon of olive oil (or whatever oil you prefer) in the same pan you browned the meet in, and saute everything. Dump that on top of the meat. Deglaze the pan with a 1/4 cup red wine, and cook off the alcohol. Pour that into the cooker.
Then, dump in the tomatoes and the beans. Add a generous tablespoon of each chili powder, and a teaspoon of cumin. If there's not enough liquid, add a cup or 2 of chicken or beef broth.
Mix it all up and cook on low for a few hours. You could be done, but I wasn't satisfied at this point. So I added the other pound of ground beef (after browning and draining). I also added a small can of black beans (Bushes Best). Two tablespoons of brown sugar, and another tablespoon of chili powder and a teaspoon of cumin, and finally, for good measure, I added a 1/4 cup of brewed coffee that I hadn't poured into my cup that morning.
Continue cooking for another hour or 2. Lastly, add a bit of masa (corn) flour to thicken up the liquid and add a bit of corn flavor.
So that's my 2012 belated chili recipe.
So let me retrace my steps.
First, you're going to need meat. And spices. So, I picked up 2 lbs of lean ground beef and a pound of sweet italian sausage (not links, just ground sausage that looks just like the ground beef). I got these at Henry's. While you are there, get a package of baby bella mushrooms.
For spices, I got ground cumin from somewhere in a little baggie. I got whole dried chili pods in bags, both California and New Mexico. I had trouble grinding these up, though. First I tried my nice burr style coffee grinder, but they were too light-weight to fall into the grinding blades. Then I tried the blender (a Ninja). That didnt work real good either, I ended up with flakes and not powder. I used it anyway..
You'll also need some tomatoes.. I used two small cans of Ro-Tel. I like beans, so I used a small can of Sun-Vista pinto beans.
Rounding out the ingredient list is 2 shallots (these look like small yellow onions) and a garlic bulb.
Here's the preparation (because just throwing it all in the pot is too easy).
First, brown 1 pound of beef and the pound of italian sausage, and drain off the fat. Put this in the slow-cooker.
Finely chop the mushrooms (and finely as you can), shallots and garlic. Then, put a tablespoon of olive oil (or whatever oil you prefer) in the same pan you browned the meet in, and saute everything. Dump that on top of the meat. Deglaze the pan with a 1/4 cup red wine, and cook off the alcohol. Pour that into the cooker.
Then, dump in the tomatoes and the beans. Add a generous tablespoon of each chili powder, and a teaspoon of cumin. If there's not enough liquid, add a cup or 2 of chicken or beef broth.
Mix it all up and cook on low for a few hours. You could be done, but I wasn't satisfied at this point. So I added the other pound of ground beef (after browning and draining). I also added a small can of black beans (Bushes Best). Two tablespoons of brown sugar, and another tablespoon of chili powder and a teaspoon of cumin, and finally, for good measure, I added a 1/4 cup of brewed coffee that I hadn't poured into my cup that morning.
Continue cooking for another hour or 2. Lastly, add a bit of masa (corn) flour to thicken up the liquid and add a bit of corn flavor.
So that's my 2012 belated chili recipe.
Saturday, May 5, 2012
I like old stuff.
Thought I'd do something non computer related for a change: http://bremenminimark.blogspot.com/
Monday, February 27, 2012
Top 10 dead or dying computer skills
This is a blog in progress I started literally years (2007) ago. Thought I'd finish it..
Recently, I read an article with a great title but utterly and completely inane content. Top 10 dead or dying computer skills, which I hesitate to link to because I don't want anybody to read it and lose a few IQ points as a result, purports to list the top 10 skills that are or will be soon obsolete. I didnt know OS/2 was a skill, I always thought it was an operating system. The article pretty much just lists off a bunch of software that is falling into disuse. If the title had been "Top 10 dead or dying software systems" it might have made more sense.
So, I decided, like any good programmer, to invent my own version. There's a great article on the subject that likens the programmer to the blacksmith. I think it's very true. While it sucks that the trade of blacksmithing has been relegated to little more than a hobby, that's just how it goes.
So, here goes:
Recently, I read an article with a great title but utterly and completely inane content. Top 10 dead or dying computer skills, which I hesitate to link to because I don't want anybody to read it and lose a few IQ points as a result, purports to list the top 10 skills that are or will be soon obsolete. I didnt know OS/2 was a skill, I always thought it was an operating system. The article pretty much just lists off a bunch of software that is falling into disuse. If the title had been "Top 10 dead or dying software systems" it might have made more sense.
So, I decided, like any good programmer, to invent my own version. There's a great article on the subject that likens the programmer to the blacksmith. I think it's very true. While it sucks that the trade of blacksmithing has been relegated to little more than a hobby, that's just how it goes.
So, here goes:
- Machine code / assembly programming. Yeah, there's still some people doing this, but only in operating systems or compilers. The compiler has nearly completely replaced writing such low level code because it can simply do it better than humans, especially on complex modern CPU's.
- Data entry. The skills associated with specific usage of any piece of software used for entering data of any kind. This includes words, images, music, video, etc. Right now you can find jobs specifically asking for experience with the programs themselves, like Photoshop, or Flash. Not so much anymore do you see them asking for experience with Word, because pretty much everybody knows how to use a word processor. These skills will finally be subsumed by the greater skill sets they are used by, like artist, or musician.
- Computer repair. I had at one time an A+ certification for working with pc hardware. Never really use it much. With people these days moving more to mobile devices like laptops and tablets, which aren't as serviceable as a desktop, the need for repair or upgrades is less and less. Its more like replace now.
- Related to 3: actually "building" a computer from parts. Used to be you bought a motherboard and ram and hard drives and a cool case etc. And you overclocked the CPU and added crazy cooling systems. Almost like making a hot rod car. People still do this of course but the popularity of mobile devices is quickly taking over.
- Related to 4: actually *building* a computer from components, something not a PC clone. You know, chips and resistors and etching circuit boards etc. I still have books from the 70's and 80's detailing how you could make a computer from CPU's and discrete logic. I learned a lot from these. Today young nerds never have to deal with low level mundane stuff like boolean logic and soldering.
- Actually physically removing dead insects (bugs) that were preventing the normal operation of a computer.
- Command line. Yes every computer these days still has a command line, even most tablets and phones based on Linux. But few people use it and the ability to do actual complex tasks using multiple commands and piping and such is limited to a few wizards.
- Needing at least half a brain to use a computer and get on the internet etc.
- Writing using proper grammar and spelling.
- And the top dead or dying skill is programming itself.
Tuesday, February 21, 2012
Everything old is new again..
So, I'm a bit behind the curve on this one. I only just upgraded my Mac to Lion. I mostly like it so far.
The full screen mode for applications in combination with the new Mission Control Spaces seems so oddly familiar to me. I tend to mostly work with the application window full sized already, so this seems natural. Being able to quickly swipe from one full screen app to another is intuitive to me. Its natural and fast.
It occurred to me that it would be more natural for my tastes if it would work vertically, but instead it only works horizontally. This clearly is an attempt to make the Mac work more like an iPad. In this case I don't object. But where have I seen this before?
Another improvement I think is the change of scrolling to reverse the normal movement. Its a little hard to get used to, but its not real annoying if you go the wrong way for a little while. It makes more sense this way.. the scrolling moves the page as if you were touching it. This is somewhat similar to back in the early days of the GUI when everybody had arrows at the top and bottom of the scroll bar, but then some systems started grouping the arrows together which I thought was better. That was something they did on the Amiga GUI.
Ah. My Amiga. I am donating my old system to an enthusiast since I will probably never use it again. And if I wanted to, I could run an emulator or AROS with much more capability anyway. Feeling nostalgic I am! I remember how it could do things no other computer could, even some things to this day that I miss. Like screens!
Hey wait! Thats where I've seen full screen apps that slide back and forth seamlessly! The full screen feature combined with Mission Control spaces is almost exactly like screens on the Amiga, except you cant move them manually and stop halfway. And they don't go vertically, only horizontally.
Everything old is new again! You can even assign apps to open on their own Space. And hey, here's an app that lets you go vertically. Nice. So, after over 15 years the Mac finally catches up with the Amiga! Its about damn time.
The full screen mode for applications in combination with the new Mission Control Spaces seems so oddly familiar to me. I tend to mostly work with the application window full sized already, so this seems natural. Being able to quickly swipe from one full screen app to another is intuitive to me. Its natural and fast.
It occurred to me that it would be more natural for my tastes if it would work vertically, but instead it only works horizontally. This clearly is an attempt to make the Mac work more like an iPad. In this case I don't object. But where have I seen this before?
Another improvement I think is the change of scrolling to reverse the normal movement. Its a little hard to get used to, but its not real annoying if you go the wrong way for a little while. It makes more sense this way.. the scrolling moves the page as if you were touching it. This is somewhat similar to back in the early days of the GUI when everybody had arrows at the top and bottom of the scroll bar, but then some systems started grouping the arrows together which I thought was better. That was something they did on the Amiga GUI.
Ah. My Amiga. I am donating my old system to an enthusiast since I will probably never use it again. And if I wanted to, I could run an emulator or AROS with much more capability anyway. Feeling nostalgic I am! I remember how it could do things no other computer could, even some things to this day that I miss. Like screens!
Hey wait! Thats where I've seen full screen apps that slide back and forth seamlessly! The full screen feature combined with Mission Control spaces is almost exactly like screens on the Amiga, except you cant move them manually and stop halfway. And they don't go vertically, only horizontally.
Everything old is new again! You can even assign apps to open on their own Space. And hey, here's an app that lets you go vertically. Nice. So, after over 15 years the Mac finally catches up with the Amiga! Its about damn time.
Thursday, January 5, 2012
Northwood's Inn
I am not often inspired to write food reviews. This is a typical case of a passive, unpasionate desire to do so. I find I have so little enthusiasm that I don't even wish to expend the calories to lift a finger to the task. Luckily I have Swype on my Android phone so in fact, I do not even need to lift a finger to write a word.
And yet I am writing this review of my inexplicably not forgettable experience at Northwood Cafe.
It was a long day, which began at 4 am as we loaded the kids into the car for our pre-planned trek out to Pasadena for the Rose Parade. Aside from the slight delay due to my intestines playing a cruel joke on my colon causing me to make an emergency pitstop at Dennys for relief, it was a smooth get away.
Arrival was painless despite warnings of draconian parking accommodations; we paid our $15 and parked half a block from the parade route. We got the 4th row of seating and we brought fold out chairs, it was perfect! We even saw that somebody we knew was in the front row. A cafe on the corner provided hot cocoa and coffee and despite the apparent owner's slight gruffness, everyone else was super nice and accommodating. Almost makes me want to move to Pasadena.
The smell of bacon wrapped hotdogs throughout the parade set me up for some good eating which we were saving for lunch time. We ended up waiting until getting to the park to see the floats up close, and I ended up with a pretty respectable mexican carnets taco plate which I wolfed down. The only importance of this is to illustrate that my taste buds were working correctly.
On the way home, after a nearly perfect day of family fun, we decided on one last hurrah: having dinner out. Our first attempt, a random restaraunt spotted from the freeway, the San Antonio Winery, resulted in a conciliatory bottle of Moscato D'Asti because they told us on the phone they were open for dinner still.
Still high on the days events and armed with the joy of a free bottle of wine we settled on "that place with the snow covered roof next to the Elephant Bar that we've never been to". Some things just remain better when you've never experienced them.
On entering, we were greeted with a very pleasing faux log cabin style decor with tiffany styled lamps and still replete with almost garish christmas decor. The kids loved throwing peanuts on the floor and took this simple pleasure to its logical ends.
We ordered potato skins for an appetizer. Unfortunately between these and the salad which consisted only of iceberg lettuce and ranch dressing, I was not appetizer. Potato skins always seem like such a tasty proposition; what could be better than a slice of potato with skins that are covered with cheese and bacon and chives? Yet I've never had a good potato skin at any restaurant. On that account, they delivered exactly what I expected.
Now, I love corned beef and pastrami sandwiches; the classic ruben is my favorite. There's nothing better in this universe. Not being super hungry I opted not for a steak or fried chicken but for what I thought might be a tasty sandwich.
In terms of flavor, I would have to say, this is a case where the whole flavor is actually somehow less than the sum of its ingredient parts. It is a sad day when corned beef on rye is this bland. Oddly, there were not condiments on it, nor were any offered. No mustard, no thousand island, no secret or public sauce of any kind. Being tired I didn't consider this discrepancy until I'd eaten half of it.
The bread was also curiously not toasted, which I had assumed it would be. If it had been toasted, that would have made the tough crust a little crispy, but without it, the bread was too chewy to eat without tearing it apart in bigger than desired bites.
I've had many sandwiches that approach having too much meat on them, but this is a logarithmic function. You can never have too much corned beef. This sandwich errs on the side of not having enough, combined with a third slice of bread to drive the point home.
In bored desperation I tried a piece of cheesy bread, but it seemed more like a slice of wonder bread with a little bit of burned butter and maybe some kind of hint of cheese on it. Even then, it didn't taste particularly burned, which would have at least added some kind of flavor, if not good.
To sum up my experience, I would have to say, this was the best not bad place I've been to in a while. I neither enjoyed nor hated my meal. I am completely ambivalent. So much so that I would be remiss in not reporting my lack of a strong opinion either way.
Update: the other half of the sandwich, after micro waving and adding mustard, was actually improved. this is wrong in so many ways I can't even begin to explain.
And yet I am writing this review of my inexplicably not forgettable experience at Northwood Cafe.
It was a long day, which began at 4 am as we loaded the kids into the car for our pre-planned trek out to Pasadena for the Rose Parade. Aside from the slight delay due to my intestines playing a cruel joke on my colon causing me to make an emergency pitstop at Dennys for relief, it was a smooth get away.
Arrival was painless despite warnings of draconian parking accommodations; we paid our $15 and parked half a block from the parade route. We got the 4th row of seating and we brought fold out chairs, it was perfect! We even saw that somebody we knew was in the front row. A cafe on the corner provided hot cocoa and coffee and despite the apparent owner's slight gruffness, everyone else was super nice and accommodating. Almost makes me want to move to Pasadena.
The smell of bacon wrapped hotdogs throughout the parade set me up for some good eating which we were saving for lunch time. We ended up waiting until getting to the park to see the floats up close, and I ended up with a pretty respectable mexican carnets taco plate which I wolfed down. The only importance of this is to illustrate that my taste buds were working correctly.
On the way home, after a nearly perfect day of family fun, we decided on one last hurrah: having dinner out. Our first attempt, a random restaraunt spotted from the freeway, the San Antonio Winery, resulted in a conciliatory bottle of Moscato D'Asti because they told us on the phone they were open for dinner still.
Still high on the days events and armed with the joy of a free bottle of wine we settled on "that place with the snow covered roof next to the Elephant Bar that we've never been to". Some things just remain better when you've never experienced them.
On entering, we were greeted with a very pleasing faux log cabin style decor with tiffany styled lamps and still replete with almost garish christmas decor. The kids loved throwing peanuts on the floor and took this simple pleasure to its logical ends.
We ordered potato skins for an appetizer. Unfortunately between these and the salad which consisted only of iceberg lettuce and ranch dressing, I was not appetizer. Potato skins always seem like such a tasty proposition; what could be better than a slice of potato with skins that are covered with cheese and bacon and chives? Yet I've never had a good potato skin at any restaurant. On that account, they delivered exactly what I expected.
Now, I love corned beef and pastrami sandwiches; the classic ruben is my favorite. There's nothing better in this universe. Not being super hungry I opted not for a steak or fried chicken but for what I thought might be a tasty sandwich.
In terms of flavor, I would have to say, this is a case where the whole flavor is actually somehow less than the sum of its ingredient parts. It is a sad day when corned beef on rye is this bland. Oddly, there were not condiments on it, nor were any offered. No mustard, no thousand island, no secret or public sauce of any kind. Being tired I didn't consider this discrepancy until I'd eaten half of it.
The bread was also curiously not toasted, which I had assumed it would be. If it had been toasted, that would have made the tough crust a little crispy, but without it, the bread was too chewy to eat without tearing it apart in bigger than desired bites.
I've had many sandwiches that approach having too much meat on them, but this is a logarithmic function. You can never have too much corned beef. This sandwich errs on the side of not having enough, combined with a third slice of bread to drive the point home.
In bored desperation I tried a piece of cheesy bread, but it seemed more like a slice of wonder bread with a little bit of burned butter and maybe some kind of hint of cheese on it. Even then, it didn't taste particularly burned, which would have at least added some kind of flavor, if not good.
To sum up my experience, I would have to say, this was the best not bad place I've been to in a while. I neither enjoyed nor hated my meal. I am completely ambivalent. So much so that I would be remiss in not reporting my lack of a strong opinion either way.
Update: the other half of the sandwich, after micro waving and adding mustard, was actually improved. this is wrong in so many ways I can't even begin to explain.
Thursday, November 10, 2011
Politics, shmolitics...
I know I shouldn't be spending time on this while at work, but, I cant take it anymore...
Christmas tree tax? Really?
I have to say, this is the most asshat thing I've heard in a long time.
And by that I am referring to the asshats who are using this to make Obama look bad when he has NOTHING TO DO WITH IT.
And by asshats I am referring to stupid republicans, whom I've about had it with (I prefaced that with stupid because I know there are smart, reasonable republicans out there, as well as ignorant democrats, to be fair)
This is NOT a tax. Its not being imposed by the government. The government gets NOTHING from this. This is a voluntary charge created BY the christmas tree industry in order to raise money for their own marketing efforts. By comparison, the milk industry does the same thing so they can pay for all those "Got milk?" commercials. But nobody ever claimed the president was imposing a milk tax! They simply work with the government to collect the fee, but it is voluntary.
And isn't this EXACTLY how things should work? The private sector decides to cooperatively do something to benefit themselves (even among competing suppliers) and has the government assist them in a minimal way.
The people claiming this is another involuntary tax should know better - they are either IDIOTS or ASSHATS who are lying to us.
Christmas tree tax? Really?
I have to say, this is the most asshat thing I've heard in a long time.
And by that I am referring to the asshats who are using this to make Obama look bad when he has NOTHING TO DO WITH IT.
And by asshats I am referring to stupid republicans, whom I've about had it with (I prefaced that with stupid because I know there are smart, reasonable republicans out there, as well as ignorant democrats, to be fair)
This is NOT a tax. Its not being imposed by the government. The government gets NOTHING from this. This is a voluntary charge created BY the christmas tree industry in order to raise money for their own marketing efforts. By comparison, the milk industry does the same thing so they can pay for all those "Got milk?" commercials. But nobody ever claimed the president was imposing a milk tax! They simply work with the government to collect the fee, but it is voluntary.
And isn't this EXACTLY how things should work? The private sector decides to cooperatively do something to benefit themselves (even among competing suppliers) and has the government assist them in a minimal way.
The people claiming this is another involuntary tax should know better - they are either IDIOTS or ASSHATS who are lying to us.
Subscribe to:
Posts (Atom)