5,207 karma · joined May 21, 2010 (16y ago) · 1,593 submissions
comment 14y ago · link · parent
Lately I've been going down the rabbit hole of Uncle Bob's Screaming Architecture and Alistair Cockburn's Ports and Adapters Architecture to create something that attempts to make it super obvious what is going on and where.
The idea is you have an "app" that is totally separate from Rails or Active Record. It consists of Actions, Entities, and Contracts. Actions are basically use cases, user stories, interactors, or some equivalent to that. Entities are just objects that hold data and do validation. Contracts act as a proxy for your data gateways and ensure the input/output formats.
Gateways are the persistance mechanism. They are objects defined by a contract and are implemented as datasource specific drivers that are swappable, so long as the driver adheres to the contract. The "app" side of things doesn't care what kind of driver you use, it only cares that you send and receive data using the right formats.
In the end you end up with your "app" being a nice bit of code that is totally testable outside of a framework or the database. To make it run with a database, you just write a gateway driver for your database that matches the Contract you wrote. It uses the simplest form of Dependency Injection to make this work.
The nice thing about this approach is that your persistance mechanism is totally pluggable, so as you need to scale, you can swap out your gateway driver without touching the app. Also, it's obvious when DB calls are happening in this system because when you call say post_gateway.find you know that it's going thorough the contract, is going to connect to whatever gateway driver you specify, and that it will return in the right data format regardless of if it hits memcache, mysql, mongo, redis, cassandra, a 3rd party api or whatever.
Also, you can write the whole "app" part of your code TDD and get like 100% test coverage. If you feel like you need to test against real data instead of mocking, you can write an in-memory or filesystem driver and your tests will still be crazy fast.
In this kind of system you could still use Rails or any other framework for your views/routing/controllers. You can use ActiveRecord or anything else as long as that code lives behind a gateway instead of being used to define your business objects.
If you are interested in this kind of architecture, I'm planning on open sourcing it soon once I have a few command line generators written to make it a bit easier to get started on.
comment 14y ago · link · parent
I'm sure I'm not the only one who looked at Paypal, Amazon Payments, or Stripe for that reason alone.
comment 14y ago · link · parent
I'm sure they are keenly aware of the shortfalls of their own software, as much as they are of the hardware they make. That's the whole point of QA. What pushing out products early does is let you start getting feedback on the known unknowns - problems you'd expect to have but didn't know exactly where they might be, and the unknown unknowns - problems you didn't see coming at all.
comment 14y ago · link · parent
Also, SOA is not always brilliant on day one, but you can give your small app a head start by writing a web api first, then build your app on top of it by making HTTP requests to itself basically or by writing your app as a service layer but not as a separate set of HTTP calls.
The point is you don't have to have a monolithic architecture to start with SOA, you can use a simple RPC or RESTful pattern and evolve it over time as your needs grow.
comment 14y ago · link · parent
Then I could follow up with a post about how my previous blog post gamed HN and got me tons of cash simply by ripping on patio11, which would be even more of the same. A double HN front page win!
Then I follow up weeks later with a "How To Game Hacker News" ebook.
I feel like I've finally discovered the ? in the Underpants Gnomes' business model.
</joke>
comment 14y ago · link · parent
Also, the it needs to be a product that could reach 100 million users or $100 million dollars is a great filter. It provides focus.
Unfortunately, based on the last 10 years of Yahoo's corporate history, there are probably a lot of bad habits and corporate culture shenanigans that will need to be dealt with before Yahoo's actions match their CEO's marching orders.
At least Yahoo is trying to do something hopefully more interesting than being another internet media company held over from the AOL era of the internet. Perhaps soon someone at Yahoo! will be able to clearly explain what Yahoo! is and does.
comment 14y ago · link · parent
Fragmentation is not a problem because Google still is the primary Android services provider. If Samsung or HTC started doing what Amazon is doing and selling Android phones without Google apps and search as a default, then Google's in trouble.
Google's biz model is to give away Android for free, but make up for it in money from the Play market, mobile ads, and mobile search.
comment 14y ago · link · parent
That alone solves the dev problem with Java ME that you would potentially need to do hundreds of separate builds for different devices and so on. With Android you have one version for all devices.
From that perspective, Android has gone beyond Google's wildest expectations and it solved at a basic level many of the Java ME problems, but that's not even close to the same goal that Apple had when they made the iPhone.
Why are people surprised that a system that was designed from day one to be what it is today isn't the same as iOS?
comment 14y ago · link · parent
People use twitter because other people use twitter.
An open service doesn't solve that, it just makes things more complicated and worse.
Wordpress works because it's not a network platform, it's a publishing one. Wordpress is inherently not a social network, it's a CMS. Sure, there are social bits, but it works well as an installable thing because you don't have to deal with issues like connecting or discovering other blogs. You can just install it, write content, and hit publish and boom, you're publishing on your own site on the net.
The only people who see a problem with Twitter right now are devs, not users.
All the "open twitter" projects are going to turn out the way of Diaspora, not Wordpress.
comment 14y ago · link · parent
At some point, we have enough power in a small space that the hardware powering your computer or laptop is basically the size of a credit card and it doesn't matter if it's ARM or Intel.
Apple can save money and get better battery life by making their own chips (as they do in phones now) so why not move that up the hardware food chain once the performance is "good enough".
Apple is about selling mobile devices to consumers and probably the #1 thing the average buyer wants is longer battery life, even at the expense of performance.
Also, Apple knows the power of controlling their own destiny and inevitably when they partner with a company, the same company tends to turn around and resell the innovation as their own products - Microsoft Windows, Google Android, and Intel Ultrabooks. Apple is big enough now they might not need to partner for such innovations much longer.
That could lead to an even bigger and more sustainable competitive advantage.
comment 14y ago · link · parent
Also, to that end, a good responsive design is not going to destroy your ability to navigate the page. It should make it easier.
The hard part of responsive design is dealing with pages that don't always have the same layout. It is a lot of manual tweaking and better tools and frameworks are needed to make responsive design faster, easier, cheaper. It's still largely a new technique.
But, after being knee deep in a responsive site redesign from the ground up, it's totally worth it for the end user.
comment 14y ago · link · parent
It seems to me if this trend isn't reversed, the "Great Recession" is bound to keep happening simply because people can only borrow so much.
comment 14y ago · link · parent
I'm much happier using Phonegap, Knockout, and Kendo Mobile to build apps.
comment 14y ago · link · parent
Before computers, Wall St. was still largely about trading and standing between people who have money and people are willing to trade ownership for money. That's it.
The problem is that HFT is about profiting on even the smallest trades, but cranking up the volume to 11. It's kind of like what Wal-Mart did to retail, they make less money per item, but they literally make it up in volume.
Algorithmic trading can be slow or fast, but it plays off the fact that machines can compute the data and make a decision faster than humans can, especially on a digital marketplace.
It is unfair to human traders, sure. But, you have a digital trading platform, so at some point it's impossible to stop algorithmic trading.
If you want a market where the purpose is to create capital for businesses without dealing with machine trading, you need to start a new market that is not run by machines and is only operated by human, person to person trades.
comment 14y ago · link · parent
Also, many of the abstractions start as good ideas, but they soon become a hammer and everything else becomes an AbstractNailFactoryInterfaceManagerProxy.
comment 14y ago · link · parent
Also, why has nobody pointed out the opportunity in taking these and making custom software for various industries like Medical, Automotive, Automation (home or industrial), Sales (of various things).
Custom software on disposable hardware could really turn into some big money businesses. Maybe there's no money in the hardware, but you can add some serious margin by bundling it with custom software and maybe add the tag "enterprise" if you want to sell to large companies.
comment 14y ago · link · parent
Also, the people who want Netflix for Linux already can get it on iOS, Android Xbox 360, PS3, Roku, Windows, Mac, ChromeOS, Apple TV, and on and on and on, so how many more Netflix subscribers are going to join that haven't already? Is that going to be enough money to offset the extra support costs as well as the likely PR nightmare described above?
comment 14y ago · link · parent
As a "status update" social network (in the FB, Twitter, MySpace), I'm not sure that Google+ is going to change the world, but as a set of communication tools, it might end up being what Wave always wanted to be.
comment 14y ago · link · parent
There are some approaches to solve some of the author's problems that end up making the Mongo system look and feel a lot more like a SQL system because sometimes data is actually related.
The author could have also taken a different approach to his data schema that would have fit more of a non-relational worldview.
Software development and architecture is about making choices and working with and around the limitations of your tools. It doesn't matter if PostgreSQL or MongoDB are "better". It's about solving a problem using a set of tools you are comfortable with.
comment 14y ago · link · parent
My guess is maybe they are going to go after other parts of the small biz segment like making e-commerce easier and so on. Ultimately, if Square can get 3% off the top of every transaction a business makes for the vast majority of businesses, there is a lot of money to be made for sure.
comment 14y ago · link · parent
comment 14y ago · link · parent
Clojure to me seems like a language culture that would likely tend towards smaller libraries that do specific things than something with batteries included and such like Rails.
If you want something on the JVM with more of a batteries included approach Play Framework for Java and Scala is pretty nice and Lift for Scala is cool if you're willing to take a very different approach to your web stack.
comment 14y ago · link · parent
comment 14y ago · link · parent
You don't need all the ceremony and structure of Rails and MVC to write a JSON api, you just don't.
Worrying about Rails' future and if it's still "winning"(for some definition of winning?) compared to node.js is silly and reminds me of how many Java devs had an existential crisis about the future of Java since Java 7 took a few too many years to ship.
Rails is a web MVC framework, that's it. It's not even the only or best web framework in ruby. Rails is not ruby. It is not designed to compete with node. Node is a totally different thing.
Compare node and ruby and that's a more interesting and correct comparison, but I've happily used both and neither one is going to "kill" the other any more than Rails killed PHP or Java killed C++.