5,207 karma · joined May 21, 2010 (16y ago) · 1,593 submissions
comment 12y ago · link · parent
I've gone really deep down the rabbit hole on these kind of highly decoupled design patterns in Obvious, clean architecture, functional programming, TDD and all of that and I realize now that Ruby is not the optimal language for this style of development and DHH and Rails' purpose is not the same purpose of clean architecture.
I go back and think about the original build a blog in Rails demos, which are great BTW, and I feel like Rails' strength is standing up an application quick and getting stuff done. Yes it can do TDD and clean architecture and all of that fun design stuff, but to be completely honest, it doesn't fit the community or the language as much as it should.
Ruby gives you a lot of amazing tools, but there are a lot of things that make clean architecture way nicer that you end up bolting on to Ruby. Stuff like immutability, type checking, and strong interfaces are not the norm in Rubyland. That is perfectly fine, but by the time you build all those tools, it's hard not to look at a language like Scala or Kotlin and see a lot of those things built in to the language along with a compiler and nice IDE support.
I love Ruby and I use it every day. I live in a Rails app most of the day and I've found ways to make to make the code beautiful, but fundamentally I don't think the Ruby community will ever truly get behind clean architecture. It really flies in the face of the reasons why most people use Ruby in the first place.
comment 12y ago · link · parent
Joel Splosky wrote about this a long time ago with the whole idea that each new set of features lets you serve more customers, but it also gives you the benefit of a new "marketing event" that you can use to go out there and tell everybody what you are doing.
Like anything, "launching" is a skill, and the more you do it, the better you get.
Tim Ferriss also mentioned once that one reason he got into nonfiction books is he can relaunch a new edition every so many years and continue to make good money with basically the same material.
comment 12y ago · link · parent
Agile works fine for teams that embrace it. It's going to work totally different from team to team. The real point is to find the process that works best for your team to deliver software that meets the customer requirements and budget. Agile for a team of 1 or 3 is not the same as agile for a team of 10 or 100.
Agile tends to fail in two places and they are both communication related. First, developers give terrible estimates because of pride. They don't think through the problem, they don't consider complexity, and they want to look awesome so they ALWAYS over promise and under deliver. That makes them look bad and destroys confidence in the project because it's dishonest.
Second, managers will take estimates and turn them into deadlines because that is kind of their job and they are doing the best they can with the bad information that developers give them (see bad estimates above). A good PM needs to really push their team for real esteems. Poor estimates lead to poor communication because when things go badly, nobody wants to send up the signal flare for help or tell the boss that the project is not going to hit the deadline. This is often compounded when the client decides to firedrill a feature or bug fix mid sprint, and the manager doesn't push back and say that it is going to push everything else back.
The best estimates are the ones that are the most honest, not the shortest.
Between the bad estimates and the poor communication that comes out of it, there are plenty of times that "Agile" goes wrong, but it's not agile's fault. It's your fault. It's your team's fault. It doesn't work if you aren't willing to continuously tweak and reevaluate the process until it fits your situation. That means doing retrospectives and making improvements based on them.
Continuous improvement makes agile work. A stagnant process is doomed to failure as requirements and resources change over time.
comment 12y ago · link · parent
I personally believe that movie studios would do well to follow the Pirate License(http://retromocha.com/pirate-license.html) approach, but I just don't see them ever being that forward thinking when they are making millions of dollars with the old way.
comment 12y ago · link · parent
Perhaps it was ahead of its time, or maybe the idea just wasn't very good. I really don't know, but it's cool to see the same ideas popping up again.
comment 12y ago · link · parent
For example, say your ORM is causing major trouble and you need to replace everything from the controller back to the database. Heck, maybe you decouple the whole backend out into an API. The only tests that help you are the end to end tests. The rest of your test suite for your backend needs to be thrown away as much as your backend itself does.
comment 12y ago · link · parent
Most developers just keep building on top of the same codebase until it is a total mess, long after the team has learned a bunch and should refactor or throw away the code and build something designed for production use.
There is really not enough discussion about when he right time to do thorough testing and when a project transitions from prototype to production quality.
I realize things like software design, planning, and thoughtfulness are heresy in the agile world of 2 week sprints, but most of these things are our own fault due to a lack of planning and craftsmanship. Complain all you want, but in general it's our own fault.
comment 12y ago · link · parent
The problem with HTML is the closing brackets that don't need to be there if you use indentation. If you are using indentation anyway, what is the point if closing tags? You can eliminate a lot of extra characters. It's not always perfect, but in many cases it is a lot cleaner.
comment 12y ago · link · parent
Ruby and Rails feel best as a prototyping platform for getting something out the door fast, proving a concept, and not worrying so much about correctness or maintenance.
I don't think if you are doing a lot of TDD and larger systems that piling on more Ruby and Rails is the right answer. I think once you know what you are working with, a well designed language with a compiler is a huge help and would remove a ton of useless tests and stuff that you end up writing in Ruby by hand.
This very likely leads to an API driven system with an API written in a strongly typed, compiled language like C#, Java, Scala, Haskell, or Go and writing your front end in whatever makes the most sense for your team.
At that point you get the benefits of a nice rapid development platform like Rails for your front end, and a fast, testable, API written in something else using all the clean code architecture you want.
The trick is, you do everything ugly in Rails or PHP or whatever in your initial prototype and you might not even write tests. You just ship working code until your prototype has proven a business case. Then, you move it towards something with lower TCO over time. Make the investment in your code when it makes sense to invest in it and use the best tool for the job at each step.
You probably never need to leave the standard Rails MVC stuff on most projects unless they are wildly successful and/your long term needs change. Even then, you can probably keep the rails front end stuff and just talk to an API and be very happy.
comment 12y ago · link · parent
Also, Google doesn't show you the top 500 websites on Google per se. They show you the top for a particular keyword in whatever order they want. People navigate by both top lists and search.
It's not like app stores are missing a search engine.
comment 12y ago · link · parent
Pretty much the same reality exists on app stores. The biggest difference is the relative cost to rank on another keyword or the long term marketing halo effect that you get in traditional search engines like Google. It costs a lot more to build an app and rank on a dozen or so keywords.
There absolutely is a long tail, it's just a different distribution curve.
comment 12y ago · link · parent
Ironically, developers would never think to do this with a storage mechanism like the filesystem. There is no great popularity in filesystem based ORM's. Somehow when we deal with the filesystem we treat it as it is - data storage and retrieval. When we deal with 3rd party api's we tend to keep them at arms length as well. Yet, when we deal with the database, we treat it as some other thing that seeks to influence the design of our code on a fundamental level.
I wrote about this like a year ago: http://brianknapp.me/the-filesystem-test/ and I don't think much has changed since then.
674.
The Pirate License(retromocha.com ↗)
3 points · by programminggeek · 12y ago · discuss
comment 12y ago · link · parent
Not everything makes sense to put out as Creative Commons. Sometimes you want to actually sell something like software or an ebook, but you don't think it makes sense to go after people torrenting your stuff and giving it away for free.
My philosophy is there can still be an exchange of value. So, with the Pirate License, you make a version of your product explicitly licensed under the Pirate License which calls those who steal your product pirates, and asks them to pass it along to other pirates or potential customers.
I think it makes the expectations for piracy much more clear and should lead to better outcomes.
comment 12y ago · link · parent
comment 12y ago · link · parent
comment 12y ago · link · parent
Later almost never happens until the system crashes beyond repair and the instability starts costing money in the form of downtime.
In the grand scheme of things, maintenance is always the most expensive part of a system, but "prototyping" languages that aren't particularly safe or maintainable are inherently going to be more expensive to maintain and deal with over the long term.
Ironically, dynamic languages like Ruby have taken the route of getting really good at unit testing and TDD instead of investing in moving their codebases from "prototypes" to "production" or "LTS" or whatever you would want to call a mature, complex codebase that will need to be maintained and evolved over time.
I'm a huge proponent of TDD, and I love Ruby, but the more I use Ruby, the more I see the problems of not having a compiler.
comment 12y ago · link · parent
Ruby (and more generally dynamic languages like PHP/Python) are and Rails like frameworks are amazing tools for prototyping when you don't know what you are building, need to iterate quickly, and need to prove out an idea. Dynamic languages are great for building things that are very dynamic, things that are in fact a kind of prototype.
Haskell and other languages with things like type checking and compilers and so on are designed to be safer, smarter, and are better long term for projects where the cost of complexity and maintenance are more significant and the development investment will get a payback.
If you don't know if a project is going to work, you shouldn't spend a huge investment to find out if it will work. So, use a tool like Wordpress, Drupal, Rails, Django, etc. to build out the minimum viable thing that you can build to prove out the idea and see if there is a real business there. Once you prove out the prototype and you know it is going to be a long term project that can pay for itself in terms of ongoing development investment, you need to throw the prototype away and build it with a tool like C#, Go, Java, Haskell, etc.
Most projects never realize they are no longer a prototype and should no longer be written in a prototyping language. Thus, you get all of the problems that come with a prototype without a lot of the solutions that we already have for solving them like compilers and such.
Interestingly, if you use a tool like Rails, there is enough there that you can get far past the point of a prototype before realizing it is no longer the right tool for the job. This is evidenced by the fact that there are now a ton of people talking about large project OOP and structure in Ruby and Rails, without them realizing that it's always going to be an uphill battle in Ruby because of the language itself.
So, if the question is if Haskell can be the next great prototyping language, then I don't think it is. If the question is if Haskell can be the language that you could migrate a project to after you realize it's no longer a prototype, then yeah it might be.
Building a large production product with long term maintenance and scaling needs in a prototyping language is very likely a bad idea and is probably why there are so many projects that start to be really difficult in dynamic languages after they reach a certain size.
comment 12y ago · link · parent
This is the kind of ambition that I feel like is missing from PC's. So much of the PC business revolves around just cutting cost and not making something cutting edge. Somehow Razer has managed to build interesting hardware that pushes the limits in a world where everyone is stuffing off the shelf components into mostly generic cases.
comment 12y ago · link · parent
It's sort of weird to me that so much effort goes into making programming languages expressive, yet we cling to incredibly terse method names, sometimes too terse, and no labels on method inputs. So, if you don't know what some bit of code does, you have to figure out what the methods are doing and what arguments they are supposed to take.
I guess to me it's like if you had to do a dictionary lookup for every word you read and had minimal context to understand a words meaning in the context of the other words around it. At the very least you would cling to a dictionary if you wanted to get anything done.
comment 12y ago · link · parent
It's a silly thing, but sometimes you have to leave to get what you want, even if you shoudln't have to.
comment 12y ago · link · parent
Having a cool culture seems like the hot thing lately, and it can be a great thing, but if you use cool company culture to be cheap on salaries, you are putting money in the wrong place. I think most people at some point would rather work in shabbier offices and get paid more than have some fancy building that only serves to impress outsiders.
When you get over 6 figures, I'm sure it's the same deal, just takes larger numbers to move the needle. In either case, lack of above market compensation is going to cause talent to move if for no other reason than because they are in demand.
comment 12y ago · link · parent
What is the cost of it breaking? $0? $1,000? $10,000?
What is the cost to fix the broken code?
What is the cost to maintain it?
How much developer time do you waste down the line because they have to fix the "working" code?
I say these things because I've seen this attitude expressed in a large codebase and it sucks a lot to work with and has wasted many hours of developers' lives.
Technical debt is almost never paid back. Just know that going in to whatever you are building.
comment 12y ago · link · parent
The Xbox is quite successful, but it's a lot of work to make not a lot of money. Why? The razors and blades concept doesn't work so well as making a 30% margin on a product people really, really want to buy.
comment 12y ago · link · parent
The best I could find at the time is IcedCoffeescript, which sort of replaces the whole existing coffee script tooling, so now you are dealing with custom tooling to install for each team member as well.
I find it sad that years later it looks like what IcedCoffeescript did is still the cleanest looking solution to the problem. It feels like the evented model is maybe great for smaller things, but horrible for building and reasoning about in larger systems on larger teams.
comment 12y ago · link · parent
This is one reason why operating a high margin, low cost business is probably better for both the owners and the employees.
comment 12y ago · link · parent
1. Consumer Behavior Requires It
2. Large Companies Thrive On Regulation
To point one, if you have anything that is making people a lot of money one way or another, there will be scams and fraud. Once there are scams and fraud, the government gets involved and has to clean up the mess. Then laws are made to stop the problems from happening in the first place. Eventually you need business licenses, certification, etc. to transact business because too many people got ripped off.
To point two, regulation and rules actually end up favoring the entrenched companies. Usually regulation creates barriers that reduce competition. For example, to trade securities, sell insurance, or sell real estate you need to get a license. To get a license you need to take exams and pay money to be certified. Most people won't go through that effort and so the larger companies make a lot of money from the lack of competition.
Rules and regulations might be annoying, but they are a sign of maturity and growth in many cases so it's not all bad.