Better HN
topnewbestaskshowjobs
Log inSign up

programminggeek

5,207 karma · joined May 21, 2010 (16y ago) · 1,593 submissions

I am a builder. I build lots of things.
Submissions

comment 12y ago · link · parent

It's been over a year since Obvious Architecture came out and over a year before that when Uncle Bob gave his talk on Ruby Midwest. People seem to just now be catching on.

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

In a lot of places it is common to have a big new feature launch once a year or so. Something as simple as a decent email launch sequence educating and informing your users and potential customers of the great new things you've added is often enough to make a nice bit of new money along with probably higher residual money.

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

This recent meme about agile is so dumb that I feel like I shouldn't say anything at all, but here goes anyway. I'll keep this as short as possible...

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

Am I crazy in thinking that Popcorn Time is a trap? It feels like one of those thins that is executed well enough that it will be seen as a threat and shut down ASAP. OR... it will be allowed to continue as a way to easily catch "pirates".

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

I really got into microservices a couple years ago and even wrote a pretty cool proxy in node to write polyglot api's using microservices. I called the project/protocal Radial (http://radial.retromocha.com) but it never really caught on.

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

Yes, but if you are leaning on your test suite to verify a huge refactor, you are unlikely to make the kind of sweeping design changes that are sometimes needed.

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

A good design is going to provide more value over time than a good test suite. A lot of developers spend a lot of time writing tests for terrible design on prototype codebases. Those prototypes eventually are thrown into production full of bugs and the answer tends towards "more tests!" instead of "better design!"

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

For the same reason we don't write Assembly code or C or binary most of the time. Just because you can do it doesn't mean it's the most effective use of your time.

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

I've spent more time thinking about clean architecture and design than most and the conclusion that I've come to is while Ruby gives you all the tools to write clean code and great architecture, it doesn't offer the best tools to do that job.

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

You have the search built in to the app store. A lot of people use that. It's how a lot of apps get found. Otherwise, there would be only 100 apps downloaded ever.

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

This is one reason I'm moving back to the LAMP stack. It's ugly, boring, and cheap. Great for prototyping.

comment 12y ago · link · parent

I'm not sure that the author of the article understands how ecommerce or search engine marketing work because it is almost exactly the same problem. The top 5 listings matter the most, the next 5 are much, much smaller, and everything past that almost completely doesn't matter. That is life on Google.

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

I think the bigger problem with ORM's or database driven application design in general is that you start to see the world through the eyes of the database and how you move things around inside it. Thus, your code resembles your database more than your database resembles your code.

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

This is exactly why I came up with the idea of the Pirate License. http://retromocha.com/pirate-license.html

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

The web is not going to "win" because the average consumer has been trained to look for "apps" from the app store, not to use web apps. Web apps packaged in the app store might be a bigger thing moving forward, but the point remains - on a phone people expect an app. No amount of needing out over how things "should" be is going to change the basic behavior of millions of users. Instead of hoping the web will win, smart devs will accept reality and make the best of it.

comment 12y ago · link · parent

I wondered how long it would take for Microsoft to basically make their own Android phone with MS only services on it. This is the beauty of open source. This is actually I think a good thing and it sort of reminds me of Apple having the X86 OS X build in the background and finally releasing it. It's not quite the same deal as Android is not replacing Windows Phone anytime soon, but it's an interesting way for Nokia to keep pace in key markets they need to be in.

comment 12y ago · link · parent

I actually agree, but I don't think most people do and there are times when static typing isn't as much fun - like say pulling data from an API and shoveling it on to a page or through some filtering or something like that or just doing some random UI manipulation with jQuery or the like. Most developers see the pain and are given a deadline and so they do it dirty and hope to have a chance to pay downy that technical debt later.

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

No, it can't. Haskell is not a prototyping language.

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

Gosh that's pretty.

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

Yes, but in the case of a sometimes inconsistent API, you get things like string methods that are sometimes method(needle, haystack) and sometimes method(haystack, needle) and so on. If you were sending properly labeled messages, like you are forced to do in just about every web api ever, you can at least inspect the message to get an idea what is going on.

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 is a pretty well known fact that in many cases the only way to move up or get paid more is to move to a different department, team, or company. Hell, there are so many cases where people leave the company because they weren't getting paid well only to be replaced by people who cost the company more than what the person wanted in the first place.

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

To be blunt, when you are earning less than $100k, when someone else is offering 10-20k more than you are currently making, you are (and probably should) going to take that deal. I've worked at companies with great culture and companies with crappy culture, and the reality for both was the same. When someone else values you higher, you start to feel like you're getting a bad deal and the things that you normally sweep under the rug start to grate on you.

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

wordy maybe, but incredibly easy to understand upon coming back to the code. At least, more than a list of 5+ unnamed arguments in an arbitrary order made up by someone you'll never meet and you can only understand by looking at the api docs, if there are any.

comment 12y ago · link · parent

This is a great excuse to write terrible code that "works" until it goes out and breaks. Then it doesn't work because you saved a little bit of time by cutting corners.

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

If you think the Surface tablets are overpriced, then you don't understand why Apple makes so much money when all the other computer companies are failing - profit. Without profit, it's hard to do interesting things.

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

I remember doing a deep dive into node and evented JS a couple years ago and I realized that I couldn't recommend it to my team because the code would become such a huge mess on an large system that whatever performance you gain, you lose in maintainability in a large team environment.

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

Yep, pretty much.

comment 12y ago · link · parent

When operating at thin margins, if those margins disappear the only way to stay afloat is to cut costs. The "easiest" way to cut costs quickly is to reduce your labor force. It is much harder to cut operational costs like buildings and infrastructure without incurring extra cost or taking a big loss.

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

Any business opportunity, currency, financial instrument, etc. that makes enough money is absolutely 100% going to be regulated for two reasons:

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.

1
222324
54