How to tell if your manager believes in "heads I win, tails you lose" - <AUTHOR> http://alexpotato.com/blog/how-to-tell-if-your-manager-believes-in-heads-i-win-tails-you-lose/

<comment><USER2> I've referred to this topic in the past as "take credit / assign blame". It's unfortunately not just a management characteristic and there's not much you can do if you are under it.

In many ways the corporate world would be better if folks realized the goal of everyone should be to help other people regardless of org chart position, and that was really the only goal.

In the world of corporate politics, the best strategy is still from Wargames -- when offered the game of global thermonuclear war, don't play.

The phrase "servant leadership" is perhaps apt. A manager's job is to help the people working for them, and that's the best thing they can do to serve the people they are working for.

If there's not much can be done to fix a situation like the above, at least remember it, many folks who become managers can become better by not repeating those same mistakes. Try to build the department you wanted to work for.

</comment><comment><USER3> > In Tom's case, if he were to take the project, he should negotiate...

Negotiate? What does Tom have to negotiate with?

As an employee, if he's assigned a task it's his job to do it. He could certainly ask for resources but the term "negotiate" seems to imply he has some choice in the matter. Like he could decide to refuse to take on the project.

This is the reality I find myself in. Now I've just decided to care about the job only as much as management does. If they don't care about certain issues; why should I? They've shown me time and time again that doing a good job or doing a mediocre job is all the same to them.

I've decided to focus my energies in other parts of my life and I feel less depressed about my job now.

<comment><AUTHOR> > As an employee, if he's assigned a task it's his job to do it. He could > certainly ask for resources but the term "negotiate" seems to imply he has > some choice in the matter. Like he could decide to refuse to take on the > project.

That statement implies a couple assumptions:

a. Tom has to do everything his boss tells him to do. What if his boss asked him to pick up the trash or clean the toilets?

b. (a) is built on the assumption that Tom is essentially an easily replaceable "widget".

His manager obviously has a need to fill and he believies Tom is one of the few, if not only, employee who can complete the project given the constraints (time/cost/personnel etc). Tom can use this as leverage to bargain for a better outcome for himself.

</comment></comment><comment><USER4> So, I'm a dev. I like programming. I definitely believe in pushing back on unrealistic expectations when given a task. Is there a way that I can do something beneficial for my career in this situation without asking my boss to turn me into a manager?

<comment><AUTHOR> Make every interaction with your manager a deal that you both benefit from.

For example, if your boss asks you to work a weekend say: "I am more than happy to work Saturday if I get an additional vacation day"

Example 2, if your boss keeps giving you tasks:

a. it is perfectly ok to say "I have too much on my plate"

or

b. you can say "I can do task #6 but you(boss) have to pick which of tasks #1-5 I am going to stop doing to make sure task #6 gets completed"

<comment><USER4> That sounds like good advice, but it seems more like basic defensive measures than something really advantageous.

 _:aside:_

I learned after my first real job that I need to protect myself from my boss's unrealistic expectations if I wanted to continue working in the position I held. But that was more of a station-keeping exercise than something to advance my career.

<comment><AUTHOR> > That sounds like good advice, but it seems more like basic defensive > measures than something really advantageous.

Well, the next step would be to determine what exactly it is that you want career-wise in the short/medium/long term.

You then use the daily interactions to gradually nudge your way there. e.g. if you want to be a manager, you need to create outcomes where you prove that you can manage people with out having authority. That shows that once you get the authority, you will know what you are doing.

</comment></comment></comment></comment><comment><USER5> Typo in second subhead. You mean "tails you lose."</comment>


E la Carte: Table-Top Computers Bring Restaurants To The Future - <AUTHOR> http://techcrunch.com/2011/04/19/e-la-carte-table-top-computers-bring-restaurants-to-the-future-with-bonus-trivia/

<comment><USER2> Am I the only one who thinks this is a terrible idea? The entire notion of going out to eat with someone is now being co-opted by having to get "entertained" via another device, interfering with conversation, and reducing human interaction. I love the fact that going out to a restaurant means interacting with someone face to face, avoiding email, texting, and phone conversations.

Yes, you can get the hell off my lawn, too. :)

<comment><USER3> The device on the table does not control your life. Ignore it and have a conversation if you want. Or, look into the future and imagine this device with live webcams of your food being prepared, perhaps showing you a short article or video describing the culinary history of the meal you are about to eat. Or perhaps you could use it to settle healthy debates with your friends / SO rather than use your phone - this is slightly more communal / social (assuming you have a smartphone; if you don't have a smartphone, then this opens up the world of debate-settling completely).

Use and imagine technology for what it can be. Don't be mad at it if you can't control your insatiable appetite for technology.

<comment><USER4> All what you described are the niche applications of a very little interest to the general restaurant going crowd.

<comment><USER5> They may be of very little interest _now_ , but never assume that peoples' tastes are static (yes, even the masses).

</comment></comment></comment></comment><comment><USER6> Not a bad idea. Not for every restaurant of course, but informal places could benefit. Though...

 _And he says that waiters actually want customers to pay using the devices, because they tend to get more tips since it's so easy to tap that 20% button._

If I go to a restaurant where the waiter doesn't take my order or handle payment or do anything except courier my food the twenty feet from the kitchen to my table then the waiters better not be expecting _any_ tip, let alone 20%. And if the restaurant can get by with one third the former waitstaff then they can damn well pay 'em enough not to need my tips.

<comment><USER7> Restaurant owners will never pay waiters enough. They're too disposable. The only reason to want to keep one on the job long-termish/for better pay is that the waiter is well-known or is well-trained and knows a lot about how the restaurant operates. But they tend to float away anyways...

<comment><USER6> Well, I don't care how much the waiter is paid, just as long as he's there and he doesn't mind the fact that I'm not gonna pay him ten bucks for the forty seconds he spends bringing my food out from the kitchen.

</comment></comment></comment><comment><USER8> I actually used one of these at a restaurant in Boston and was fairly impressed with how well they streamlined ordering. The games on them wouldn't win any awards, but were up to the job of amusing two people while our food was prepared.

</comment><comment><USER9> We have had similar ones in sushi shops for years in Japan: <http://www.garbagenews.net/archives/1511123.html>

And some of them can be used with Nintendo DS: <http://www.garbagenews.net/archives/1406127.html>

As far as I observed, one of the problems with these devices is they give the restaurant a bit of cheap look. That's partly due to their poor make, but most probably, the guests feel embarrassed similarly to when one takes out his cell phone just in the middle of dinner.

</comment><comment><USER10> I don't have a problem with this. I think it can and will be useful. Although, I really believe innovators are missing a huge market for this kind of product (one that is trying to ease a physical buying experience).

And that's the retail/shopping market. If I had it my way, there would be large screens in department stores that displayed ratings and reviews of products congregated from a number of websites.

For instance, take the Nordstrom shoe department. Instead of having shoe displays against the wall, I really think they should have scrolling reviews displayed on sizable screens.

When I walk into a store, I rarely know what's worth my money. And who really thinks a salesperson is the right person to be helping you make a decision (or talking you into a decision...)? And yeah, I could search my phone for product reviews, but that's a hassle.

I just threw these images together, so you can get rough idea of what I mean. BEFORE - <http://www.dropmocks.com/mUKVS> and AFTER - <http://www.dropmocks.com/mUJoj>

Sorry to get a little off track here. Best of luck to the E la Carte people!

</comment><comment><USER11> Why isn't this built as an app on the iphone/droid/ipad? e.g. App with say 4 modes of customer, waiter, kitchen & restaurant.

Customer mode:: order =before= you get to the restaurant, book a table, pre- assigned seating, bill split, rate your food, rate your waiter, etc.

Waiter mode:: When a customer doesn't have their own smartphone/ipad. Plug in with the 'square' for payments.

Kitchen mode:: Customer is 5 minutes away (gps), start cooking! (order added to queue). Just stepped in (bluetooth/wifi?discovery), queue the drinks, ready to plate!

Restaurant mode::seating arrangements, waiter assignments, VIP customer tracking (CRM for restaurant customers! we can track them now.), stats, etc.

Biggest business plan benefit - Instantly scalable, global immediately (it's an app!), lower hardware costs, tie in to upsell restaurants on services, etc etc etc.

ps. I'ld love to have something like that on my phone. And yes, opentable should have really done something like this years ago.

<comment><USER6> a) Not everybody has a smartphone

b) Most people don't want to download another damn app just to be able to eat at your restaurant.

c) Being able to order before you arrive usually isn't really a big advantage -- otherwise places would have done it long ago by phone.

Might be useful for take-out food during the lunchtime rush, though -- order and pay for your lunch from the office, and then stroll down to collect it. But some places already have an web-based system for this, with no need for a separate app. Still, I guess the app-based idea might make life slightly easier -- just show the screen of your phone to pick up your order.

</comment></comment><comment><USER12> Is it substantially different from uWink (<http://en.wikipedia.org/wiki/UWink>), or just better executed ([http://lemonodor.com/archives/2008/05/uwink_a_cold_greasy_pl...](http://lemonodor.com/archives/2008/05/uwink_a_cold_greasy_plate_of_fail.html))?

<comment><USER13> It's more like a copy of (<http://www.tabletopmedia.com>).

<comment><USER14> In the way Google was a copy of Lycos, maybe.

<comment><USER13> No bias there. =) Shouldn't have said "copy", maybe just "another company doing the same idea". Best of luck to your investment.

</comment></comment></comment></comment><comment><USER15> Used a similar system at a conveyor-belt sushi restaurant in Japan. It's absolutely _ideal_ for situations like that, and possibly for many restaurants as well, and the ease of ordering will probably encourage people to grab a dessert - there's no need to flag someone down.

It is not, of course, the best for every restaurant. But I doubt that's their goal.

Best of luck to them, hopefully they make something nicer to use than the POS terminals have!

</comment><comment><USER16> This sounds like a promising idea that executed well can be very successful. I wish them great success.

Now that I got that out of the way, I hope I never go to a restaurant that has this. Let me explain why...

Reread the first paragraph. If you don't feel like back-clicking, here's the gist of it:

 _... the restaurant song-and-dance routine ... wait ... wait ... wait ... wait ... "Check, please?" ... hand gesture ... furrow our brows ... mental math ... and, finally, get up to leave ... Whew._

Guess how many times I go to a restaurant with this kind of experience? Once. I won't go back.

In other words, the restaurants that can most benefit from this kind of service are exactly the ones _I don't want to eat at_...

We both work hard and eat most meals at home. So when we go out, we want to be pampered. In fact, we _insist_ on it. And I make it clear to my server every time we sit down with something like, "We've had a tough day and came here to relax with great food and service. OK?" In decent restaurants, most good servers see that as a challange and rise to the occasion.

I don't want to ever wait for _anything_. I want a drink as soon as I sit down. I want to discuss the menu with someone knowledgable. I want time to eat my salad without the main course coming too soon. I want my food to be delivered by my server, not some runner I've never seen before. I don't want to be interrupted mid-sentence. I want my server to be aware of my needs without being in my face. If a restaurant does this, we will return over and over and tip much more than the standard 20%. If they don't, we'd rather just eat at home.

I understand that the great masses of people don't feel this way and that's why E la Carte has so much potential.

But as for me, I've been looking at a screen all day long, so the last thing I want to do is order by terminal at Applebee's. I rather pay $100 for one nice dinner per week than $25 for 4 lousy ones.

<comment><USER17> In general I agree with you, but one feature to me would be worth the price of admission. Instant check payment and leave. Typically with kids, when we're done eating, we're done NOW. We need to leave pronto. Not in two minutes... now.

So the ability to simply say, "OK, dinner's over". Hit a button and head out the door in five seconds would be great. Probably not something you put in a five-star restaurant, but for family friendly restaurants its the type of thing that would make the difference on where we decide to go on a Wednesday night.

Also, I generally don't like waiters taking my credit card to process. Could pay cash, but generally don't carry cash.

</comment></comment><comment><USER7> So are the E la Carte devices given to the table and picked up after finishing sorta like menus? Don't they get in the way while eating? Really interesting novel idea. If it reduces the hassle for waiters, I'm all for it. Looks like a pretty win-win situation.

Which POS-es does it integrate with?

How's the security model; can some derps come in and try to pwn one while eating by setting up a wireless sniffer which picks up all transactions from all devices in the establishment?

Also, isn't the name and domain name really uncomfortably close to <http://www.e-lacarte.com/about-elacarte/index.cfm> ?

Great to see YC get into the food business, only good things can come from this.

<comment><USER8> They're just left on the tables all day, and didn't end up getting in the way for us any more than a salt and pepper set would.

</comment></comment><comment><USER18> Sounds fun. Here in LA, a couple of restaurant entrepreneurs are building on the success of The Counter, an upscale custom burger quick-serve, with an iPad-based concept restaurant. The first one opens next month.

[http://www.usatoday.com/money/industries/food/2011-02-16-ipa...](http://www.usatoday.com/money/industries/food/2011-02-16-ipadcafe16_ST_N.htm)

</comment><comment><USER19> Bones steakhouse in Atlanta (a landmark) gives every table an iPad instead of a printed wine list. Very cool, and it actually increased their sales immediately.

[http://whatnowatlanta.com/2010/09/14/bones-steakhouse- uses-i...](http://whatnowatlanta.com/2010/09/14/bones-steakhouse-uses-ipad-to- display-1350-item-wine-list/)

</comment><comment><USER20> There is no doubt that his device has a great potential! This device brings extra customer experience and income boost for restaurants. Great idea! It will be a big success.

</comment><comment><USER21> This reminds me of those kiosks they have at airports begging you to play games while you wait. I never see people on them but have always wondered how much they made.

<comment><USER22> Perfect project!!! Whether it is possible to take part in this matter?

</comment></comment><comment><USER23> I'd be surprised if this hasn't been done before, but I hope they get the execution right! Does anyone know how previous attempts have fared?

</comment><comment><USER24> Sounds great for casual casual dining .... and I would kill for a simple way to split the bill at the end of a meal with 10 people!!

</comment><comment><USER25> So wait... Who am I tipping? It seems to me this device replaced the waiter with a busser... Or am I missing something?

</comment><comment><USER26> Amazing concept. I'd love to give it a try in person.

</comment><comment><USER22> We need it in Russia

<comment><USER20> In Poland too!</comment></comment>


Ask HN: Would you participate in augmented reality exercise? - <AUTHOR> This would be pretty brutal, imagine the augmented reality is displaying/you hear a serial killer chasing you up a mountain and you have to run up the mountain to escape. Part of it you climb walls and the AR shows you where to grab onto something like a game. The particular niche would be aimed for more fit/"parkour" people that can do crazy stuff like jumping gaps (running leap).<p>I don't know that would be a cool event I'd think. <comment><USER2> Reminds me of that Netflix episode of Black Mirror. [http://www.theverge.com/2016/10/25/13401020/black-mirror- sea...](http://www.theverge.com/2016/10/25/13401020/black-mirror- season-3-episode-2-playtest-recap)

I suggest you give it a watch ;)

<comment><AUTHOR> Hmm I started to watch it a while back. Not sure if that is in the second/third season.</comment></comment>


Ask HN: Enterprise Java guy needs advice on what to transition to - <AUTHOR> I have made my living doing Java enterprise development for big companies for the past 10+ years. I can sense the world is changing (much like when I transitioned from C/C++ to Java) and that I need to make a change. Frankly I am tired of all the complexity and over engineering of enterprise Java. For all the effort, I find most apps are large (1+ MLOC), monolithic, hard to understand and maintained by large groups of onshore/offshore resources who just keep the stuff running by sheer numbers and have no pride in their craft. I want to do something better as I still have about 20 years left in my working life. I have played around with Python and like it but not sure how it will scale up to a large project. Any advice appreciated, especially from those who have already made the transition. <comment> brown9-2 _Frankly I am tired of all the complexity and over engineering of enterprise Java. For all the effort, I find most apps are large (1+ MLOC), monolithic, hard to understand and maintained by large groups of onshore/offshore resources who just keep the stuff running by sheer numbers and have no pride in their craft._

If this is the type of thing you want to move away from, then I don't think that the problem is teams that use Java - the problem seems to be working for large enterprises.

I suggest that as a first step, ignore any questions of language/platforms/tools and instead think about what type of company you would like to be working for: a small start-up, a more-established medium size business, etc. Do you want to work in a place where the primary business product is software (i.e. a software development company), a place where software is something that is done in support of the primary product being sold, or are you interested in consulting for others?

Once you decide what type of environment you'd like to work in, then the rest of the decisions follow naturally from that.

As a single anecdote, I work for a medium-to-large software-as-a-service company business where most of our work is in Java, but we are very far from the notion of monolithic apps with 1M LOC and offshore teams.

The language/tools are not the problem, it's the people/organization.

<comment><USER3> _> The language/tools are not the problem, it's the people/organization._

The language _is_ a problem, because Java was specially created for _this_ type of organizations. And it is not surprising that Java attracts _this_ type of people (fungible crowds having no pride in their craft).

<comment> brown9-2 I disagree that it's possible to paint all developers using this language with such a broad brush. By this notion everyone that uses Rails loves being a "ninja" and monkey patching.

<comment><USER3> My comment was about the language, not the people. I have no doubt that there are many good programmers who use Java.

But I'm not sure one can be a good programmer if Java (or any other mediocre language) is the only thing she knows.

</comment></comment></comment></comment><comment><USER4> Given that you know Java, you could consider transition to Android - it is a lot simpler than enterprise Java (because it has to run on a phone) and most of the APIs have been reworked.

But then that is just me.

<comment><USER5> Seconded, and extended to languages for other mobile devices. Since most things are (unfortunately) web-centric nowadays, it's a relatively safe bet that knowing how to throw code for smart-phones and tablets will keep you employed (and entertained!) for at least the next decade.

<comment><USER6> _Since most things are (unfortunately) web-centric nowadays_

Disagreed. Theres much more that needs to be programmed. Think of devices, health information systems, traffic routing etc.

"Most things are web nowadays" is often said, but just wrong.

</comment></comment></comment><comment><USER7> I switched to Groovy/Grails a couple of years ago and haven't looked back. Lots of fun to work with, and allows me to reuse my previous knowledge base.

In addition to reusing my previous expertise, there are four thing I really like about it:

* Convention over Configuration makes things so much simpler * Groovy Language has a lot of great features, allowing for much more concise code (though it does take some time to get used to dynamic typing) * Plugin ecosystem - over 500 plugins on various topics allow you to get things done much quicker. The plugin architecture is wonderful and allows you to compose your from reusable blocks, which could have their own UI. Best actual (as oppoed to theoretical) code reusability I've ever seen * GORM (object relational mapper) is a thing of beauty. It's fairly implementation-agnostic, so you can use it with Relational DBs, switch to Mongo or Reddis as the persistence backend fairly easily.

Definitely recommend you check it out. In terms of jobs, it's not as big of a community as Java yet, but I definitely see many jobs advertising those skills.

</comment><comment><USER8> As others have mentioned, migrating to something else on the JVM first will allow you to reuse some of the skills/knowledge you have while you gradually focus on the 'new' aspects of something else.

JRuby and Jython are both good stepping stones to ruby and python, which would give you an idea of if you want to head in those directions full time.

I'm partial to Groovy myself, and I'd consider it more a superset of Java (though technically its not). You can reuse as much or as little of Java as you want - even in the same file - while picking up the new idioms.

Groovy, JRuby and Jython will all help you dispense with much of the boilerplate cruft you see in traditional Java, without giving up the power/libraries you're used to. And they all have good webstacks (Grails, Rails, Django, for example).

Moving off the JVM, if you're looking in to web work, PHP - as much as it has a bad rep in certain quarters - is where a lot of work is. The code quality of projects you may find tends to be hit or miss, but it's certainly possible to write clean, elegant and scalable code in PHP (and I've seen some pretty piss- poor rails in my day as well - nothing's perfect). Have you considered looking at .NET as well?

As someone else said, the 'scalable' thing - don't fret about it. Anything is scalable, and each platform will have different techniques - they all have pros and cons, which may not always be apparent until you dig more deeply in to the constraints of a particular language or platform.

Find a couple platforms that are of some interest, and focus on finding some communities for those platforms (Django, Rails, Zend Framework, Grails, ASP.NET, whatever). Getting a feel for how the community thinks about problems, what they focus on (features, security, etc) will give you a sense of what you're comfortable with.

</comment><comment><USER9> Given your Java background, and that you want something more simple you could give a try to the Play! Framework, and you could try to learn Scala.

</comment><comment><USER10> Start with Scala. Then try Play! and such. Also look at GWT. And do iOS. Much better job market than Python etc. <http://blog.getgush.com/>

I'd stay away from Groovy etc.

Also, please get over that "scaling" stuff. PHP scales just fine. Rails scales just fine. Python scales just fine.

<comment><USER8> Why stay away from Groovy?

<comment><USER10> The Java programmers I know consider it bloaty and oldskool.

</comment></comment></comment><comment><USER11> Here's my take, but keep in mind that I've never worked with programming, I'm just a hobby programmer for now.

I don't really see why you have to bind yourself so hard to a language/platform/whatever. You don't have to be a "Java programmer" or a "Python programmer". Instead aim to become someone who can move around and choose whatever is best for the job, or whatever the job might require. In the end it's just programming, different types of programming sure but never forget that you're basically doing the same thing in a different way. When you see that you realize languages are just tools for you to use, not the other way around.

The first step IMO would be to expand your horizon, see what else is out there. Try out the exotic languages you see everyone rave about, give Python a blast or drive Ruby for a while. Do things in Erlang or Haskell just because it's different from Java and mix web development with low level or simply make a game or a program you've always needed.

When you know what's out there, when you've gotten your feet wet, then you can focus in on something a bit more. The thing that has kept my interest in programming alive is I've always done what's fun, and I can only imagine that's even more important for someone with 10+ in the business actually working with it. So choose something you feel is fun, oddly for me the funniest things are the new and different stuff (Haskell for example).

Long story short: Don't be an "X programmer", be a "programmer" and go where the fun is!

Best of luck to you.

</comment><comment><USER12> What do you want to do? What do you want to build? What gets you excited?

Try various things, and pick one that actually gets you excited, and makes you think "wow, this is so cool" - not something that makes you think "well, the market seems to be moving in this direction, so there'll probably be decent money there".

</comment><comment><USER13> Well you've probably got Java down pat by now, try something new that will put bread on the table. Learn Ruby and Ruby on Rails.

This should get you away from the overengineering that Java seems to attract and there are plenty of Rails jobs out there (certainly more than there are Grails jobs anyway).

Whilst you are at it pick up some new technologies such as mongodb.

It would be good for your soul (and skill as a programmer) to try something new, completely new. You could of course also learn ObjectiveC++ and become an iPhone developer. Whatever you pick make sure that it puts fear in your heart, something that will challenge you. A mountain to climb rather than molehill.

</comment><comment><USER14> Clojure. Runs on the JVM, lisp-based, new/exciting, paradigm-ific, challenging, and elegant. Enjoy.

</comment><comment><USER15> I would suggest experimenting with Groovy/Grails on some weekend projects. Grails is similar to Rails so you could easily leverage this knowledge if you ever wanted to move to RoR.

Beyond that I would agree with earlier commentators that the real action over the next few years will be in JavaScript. Both server and clientside. The former being particularly interesting.

</comment><comment><USER16> I have a similar background and am also working as enterprise Java Dev. Financially, I don't think that it is a smart idea to transition at the moment (at least in germany, where I live). Java developers still seem to have the highest salaries, the most job offers and the best outlook in general.

There are various interesting technologies that COULD replace Java or at least JEE in the future, and it is certainly a good idea to learn them or do projects in your spare time. But beside Java, I don't think that there is any technology that you can be sure that it will be still around in 5-10 years.

If you are just sick of Java and need some change, then try to find a new job where you can work with whatever you like. Java changes pretty slowly, and you can still change your mind a few years later and find a Java job. But if you need to decide for a language as a career-choice, stick with Java, at least for a few more years.

</comment><comment><USER17> I couldn't agree more. For most projects today, Java is severe overkill where a more high level language is better suited. While I'm not a fan of the Java language, the Java platform is rock solid and we can all agree it's not going away anytime soon.

I'd recommend taking a look at JRuby. It works nicely with Java libraries and loading Java classes. You don't have to deal with dependency injection. Variables aren't typed, values are. Class and instance methods are managed in the same class declaration. Classes can be easily extended. Classes are loaded into constants at runtime - instance objects are created (and constructor called) by calling the "new" method on a class constant (hence no dependency injection required). Class methods can't be called by an instance objects and vice versa.

While JRuby would be new to you, it's on a familiar platform. <http://jruby.org/>

<comment><USER18> I've been thinking about DI in Ruby, and I've been trying to think of how I'd deal with the absence of DI in Rails. Here's a scenario...

Suppose you have two different ways of gaining information about a logged in user. Let's say one goes to LDAP, and the other goes to an RDBMS. You'll be using one or the other depending on where the software is installed.

So in Java, you create an interface that defines the methods you'd need to identify and retrieve a User, and you write an LDAP and an RDBMS implementation. The code deals only with the interface, never the implementation directly. So if you want to switch them, you just create a setter (assuming we're using setter injection) and notify your DI container of which implementation should be injected.

I definitely get it that in a language with duck typing, there's no need for the interface/implementation gymnastics. You can just pass whatever class you want, and as long as it responds to those method calls, you're golden. So in that sense, DI isn't really an issue.

But what about the nice decoupling you get - is there any easy way to swap out a particular implementation in Rails? I'm trying not to think too much in Java here, it's more of a general problem, definitely doesn't mean I'd necessarily want to force DI onto a language that takes a completely different approach to things...

Sorry to get so technical here, just seems like you might have some insights into this.

<comment><USER17> Your question is more in regards to Ruby itself, and not Rails. You don't have to swap out implementations in Ruby.

Implementations aside, when you do DI in Java, it serves two purposes: 1) instantiates an object and 2) wires it into another object. Remember that in Java, each class is in it's own file. In ruby, you can break classes into several files, but you don't have to. Ruby simply reads class declarations at runtime and instantiates those classes into constants. This means that your classes are always available. If you've defined a class method, you can call SomeClass.some_class_method. If you want to work with an instance of that class, you would call SomeClass.new - to which you can pass args to a constructor.

In your instance, you could have three classes - User, UserLdap, and UserDb. You might call User.find( person ), and in the find method you would test your conditional on whether to use UserLdap or UserDb. If you had common methods you wanted to share between the two, you could place those in User and extend that class for use with an instance object. Another option for sharing methods cold be to place them in a module, which you can then include in your class.

It's hard for me the make a recommendation for your specific problem at hand. My best advice is to read up and Ruby a little and begin to put what you learn into practice. Here's a couple of recommendations:

<http://www.humblelittlerubybook.com/>

<http://mislav.uniqpath.com/poignant-guide/>

My light bulb moments were realizing that all class declarations are loaded as constants at runtime and class & instance methods are also managed in the same class declaration. HTH.

<comment><USER18> Thanks for your reply...

I'm kind of following you - unfortunately, I don't know ruby well enough to understand what you mean when you say class declarations are loaded as constants at run time, but I'll definitely look into it.

I think there's a third purpose to DI that you didn't mention. The container does instantiate an object and inject it ("wire it") into another object, but the real benefit is that you can externally configure which object to swap in. That last part might matter less in a language that doesn't have to be compiled but it can still be valuable if you have a lot of different implementations that need to be swapped in/out in different deployments.

The method you described for person - testing a conditional - do you mean you'd create a method with a conditional, and choose which implementation to use based on that conditional? I've done this, and it certainly works, but it isn't really a placement for DI (this sounds more like a factory method, though again I don't think that those really exist to the same extent in ruby since duck typing is much more flexible than static typing). My problem with this approach (if I understand it right, which I'm not sure I do) is that this would lead to a very long series of conditionals to load the right class. In rails, I'd probably be looking to pull them out into a yaml file (something like the applicationContext file in Spring).

<comment><USER17> "class declarations are loaded as constants at run time"

Let's say I create a class called User. When ruby sees that declaration, it creates a constant called User to contain that object. When I create a new instance:

user = User.new

"User" is a constant whose value is the object/class. "new" is a method that calls the constructor (if one exists) and creates a new instance. The same applies when you call something like:

User.find

You're not calling find() on an instance, you're calling it on the object that's loaded into the constant "User". The class declaration "class User" is saying User is the name of the class; User is also the constant in which it's stored. It's also what allows you to reopen a class on the fly to extend it with more methods.

"I think there's a third purpose to DI that you didn't mention. The container does instantiate an object and inject it ("wire it") into another object, but the real benefit is that you can externally configure which object to swap in."

True, but I've never found myself switching objects out on a regular basis.

As you mentioned, the conditional approach probably isn't the best. What I'm assuming now is that you're based on your deployment, you might use a different bean factory configuration file? And this works as long as UserLdap and UserDb implement the same interface?

That being said, instead of sprinkling conditionals throughout user, you can dynamically assign User initially.

User = UserDb

OR

User = UserLdap

and as long as UserDb or UserLdap had a find() method, you could then call

User.find

Remember, User is now a constant that references the same value as UserDb or UserLdap

Does that help clarify?

<comment><USER18> Responding very late, sorry...

It does help clarify this, thanks. It does still leave the problem that you have to specify the "type" in the code and can't swap it out. That said, I think this could probably be handled easily with a yaml file (just specify the class you want to instantiate every time a user is created)? I may try that some time.

</comment></comment></comment></comment></comment></comment><comment><USER19> The future in the next 20 years is mobile development. Currently, for software on the actually device that means Objective-C for iOS(iPhone) development, or Java for Android. Of course, HTML5 and CSS3 are going to important for web pages viewed on the device. Find something you like in this area and stick with it!

<comment><USER20> I just wanted to reply "20 years?! Realy! Very bold prediction", but then I thught to myself - if someone said in 1991 that the future in the next 20 years would be web... he would have been right... interesting, isn't it.

</comment></comment><comment><USER21> As a recovering java enterprise developer I'd say pick a small project you are interested in and another language you are not familiar with and try it out. I found ruby an easier transition from java than python, Go might be interesting for you if you are coming from c++. Just make a small app in your free time and realize that a ridiculous number of startups these days have code bases measured in thousands of lines of code rather than millions. It is wonderful to live in a world where you can hope to understand the whole system.

<comment><USER22> > Go might be interesting for you if you are coming from c++

Go might be more interesting if you are coming from C. Go and C++ are pretty much antithetical.

For some reason Go also seems to interest people coming from Ruby.

</comment></comment><comment><USER23> "Enterprise" Java does not need to be the way you have experienced it. We are getting ready to release a fairly complex Java application that addresses a very significant pain point. The major components of the entire application are highly decoupled. Our team is currently two developers, and we do not envision it to grow over three. The whole development process took only 8 months.

So... don't blame Java for poor architects or poor engineering/business leadership...

(And, btw, I'd love to talk to you if you are in the Boston area.)

<comment><AUTHOR> good point. Unfortunately, I have ended up working on big apps that were written early 2000's during the big Java migration which means Jsp/Struts 1/EJB 1&2\. The apps tended to be developed under a short timeline by a lot of developers so the lack of clear direction really shows.

Sorry I'd like to meet up but in sunny South Carolina (go gamecocks !)

</comment></comment><comment><USER24> I've done a ton of spring / hibernate enterprisey stuff and am now focusing on iOS and Android development.

For one off stuff I usually use ruby nowadays, and if mobile would not be my thing, I'd definitely be delving in to Rails (have some previous experience here) and Node.js.

I've done some projects in Django but didn't really dig that as much. There's a ton of Python frameworks out there though, and Python the language is pretty cool to work with and a breath of fresh air if Java has been your mainstay for the last decade.

</comment><comment><USER25> I'm walking the same road, been working on the Java platform for 8+ years. The recent trend of new languages on top of the JVM is really exciting, so you have several options to investigate without trowing away all your existing Java knowledge.

Groovy + Grails is a great platform and it feels like a grasp of fresh air, but there is also Clojure (with an emerging ecosystem), JRuby (and you can run Rails on it), Jython and Scala to name a few other options.

</comment><comment><USER26> There is plenty of work doing GWT+(Spring|Guice) apps in areas more interesting than traditional enterprise Java.

Also, there are a lot of interesting infrastructure projects written in Java (Hadoop, Lucene, Cassandra etc). It's pretty easy to get started in any of them.

If you really want to do a new language then I doubt you'll find many people arguing against Python. But the real action is in Javascript (both server & clientside)

</comment><comment><USER27> > _"I have played around with Python and like it but not sure how it will > scale up to a large project."_

Which is more important - a new language or a new career path? In other words, would "Enterprise Python" or "YC Java" provide more of the change you are seeking? From your post, I get the sense it is the latter. Good luck.

</comment><comment><USER28> I'm surprised that more people haven't mentioned javascript as a new language to get into. Becoming an expert at it looks like it could become extremely valuable very quickly, simply because it's everywhere on the web now. It doesn't matter what backend a site has, 'every' client is using javascript.

</comment><comment><USER29> Mobile markets are going to explode over the next few years. There's a lot of potential growth there and mobile developers are in high demand. But the best would probably be to try making your own app and become an entrepreneur. You should start with Android since you already know Java.

</comment><comment><USER30> Look into JRuby and Ruby on Rails.

You'll get a fun development environment, a less formal language. The big plus for you is that JRuby has wonderful Java integration, so you'll be able to use all the Java libraries and infrastructure you've learnt over the years where they make sense for your project.

</comment><comment><USER31> >I have played around with Python and like it but not sure how it will scale up to a large project.

If by scaling you mean how to organize a large codebase, IMO, it is not hard at all and usually the python codebase is much smaller than a similar java project.

</comment><comment><USER32> ruby/rails, unless you have anything specific in mind.

everything you've heard about it is true. its great, and the learning curve for someone who isn't a cut-and-paste coder is small. i made the same switch a while ago, java/c to ruby, and it was like a weight lifted off my shoulders.

</comment><comment><USER18> Would you be willing to elaborate a little more on what you hate about Java? You mentioned "complexity and over engineering", which is what I hate about it these days too.

The thing is, I used to _like_ Java. While I've been mainly interested in Ruby/Rails for personal projects, I've had to keep coding in Java for my work, and I've started to hate it too. But there are a lot of things I still like and miss about it, including moments when I think I'd actually still choose to use Java for a project.

Looking back, I think my enjoyment of Java ended around 2005, which was when Servlets and JSP were replaced with Struts, Spring, and Hibernate. I know a lot of people felt this was a huge improvement over the original EJB, but personally, I was astonished that people thought Spring, Struts, and Hibernate were "lightweight" (I never even bothered with EJB). While these frameworks have improved greatly and aren't nearly as hard to use as they were a while back, but I still don't like coding in them.

I think I miss the "recipe" approach prevalent prior to 2005, where you stuck closer to the "low level" servlet/jdbc approach, and you either brought in a new library for a specific task, or decided to write the code yourself. It was a bit laborious, but there wasn't much you couldn't do if you were willing to do a lot of typing. This approach seems to be an evolutionary dead end now - people generally start their projects in a framework (rails, django, spring), and stay within it for the remainder of the project. So there isn't really any point to a servlet "cookbook" anymore. It's either a Spring cookbook, or a Struts cookbook...

I think some new technologies have made Java more enjoyable - <USER2> Maven, but I felt that Spring made Java far less enjoyable. It's a personal opinion, but to get a sense of it, I recommend you try working through the SpringMVC tutorial on the SpringSource site. Like I said, this is pretty much just a personal preference of mine - if, after doing the tutorial, this seems like a great way to write web apps, then by all means, go for it. But personally, I can't stand it.

I've been wondering if maybe there's a niche out there for people who like to use java at the low level. The funny thing is, I obviously do like frameworks, since I'm pretty enthusiastic about Rails. I think that it's just that _if_ I'm going to use Java instead of Rails, then obviously there's a reason, and it's probably because my tasks are taking me outside the normal operations of a framework.

I think this comes down to wanting to be either at a very effective and efficient high level of abstraction, or wanting to get down into the grit of the problem and be able to do anything. While there was a time that it would have seemed funny to refer to anything Java related as "low level", pure servlets and jdbc seem to be taking that role in the middle tier (not just within SpringMVC or JPA/Hibernate, even non-java languages seem to be compiling to Java to run on the JVM).

Ok, this is a long rant, maybe it should have been a separate post completely. It just seems like we're in the same spot, and I want to ask you - do you think you might enjoy Java more if you dropped back from the enterprise- framework thing and started using it where (in my opinion) it still excels, the "low-ish" level of the middle tier? I wonder if other people are starting to feel the same way I do about this - that Java has its place, but when it does, your probably going to want to be going in as low level as you can with the language - otherwise, you'd be using something else.

<comment><AUTHOR> Sure. First I like Java the language. I dislike Java the enterprise platform. I don't like XML as another programming language, I don't like having to fire up a giant container to test a piece of code (looking at you weblogic). Now things are probably moving in the right direction - I did try EJB3/JPA and it was ok. But I'd hate to be a new programmer coming to Java and being confronted with Spring, EJB, Hibernate, JSF and an app server just to shove some data in and out of a database.

<comment><USER18> I agree that things have moved in a better direction lately. I recently wrote an app using Struts 2, Spring, and JPA (backed with hibernate), and I made heavy use of annotations that did greatly reduce the amount of XML. I'd agree with you, though, that this would be a nearly impossible (and probably pointless) task for a newcomer (including experienced developers who haven't done much Java). I almost have to wonder who even uses these things anymore... they're too complicated for programming newbies, and I have trouble believing that an experienced programmer from Rails or Django would be willing to put up with it. Are the only people who use this stack existing Java developers who learned java back when it was manageable? I can see someone slowly backing into these frameworks incrementally (like you and I did), but if you're new to Java, it's got to be a thousand pages of reading. I'm prepared to believe that a smart, studious person still wouldn't be there in six months.

What do you think about my other suggestion - dropping back to a lower level of code for java applications? I don't think the servlet/jsp approach is anywhere near as hard to learn, and I think it can be effective. As for not reinventing the wheel... well, I'm all for bringing in components incrementally as you need them - MVC, web service APIs, DI containers.

What do you think - could Java be more popular if the "java community" embraced the lower level approach, starting with Servlets/JDBC, and leaned toward gradual integration of technologies as needed? (I know, it's hard to speak of a "community", it's really just a collection of individuals, but it seems like the overwhelming thrust of the Java world has been starting within frameworks that add tremendous overhead at the start and actually sometimes become a hinderance as the app grows).

<comment><AUTHOR> yeah you are right, I learned servlets / jsps from Marty Hall's book and then just progressed from there. For smaller projects I usually start with Tomcat + Stripes + iBatis Sql Maps in order to minimize the learning curve. But no self respecting corporation would consider that stack (even though it is free, easy to learn and very fast).

<comment><USER18> What do you think are some of the factors behind the resistance to some of these alternative frameworks? I've heard good things about stripes. But it seems like almost every MVC framework other than Spring MVC is losing mindshare. I actually think Struts 2 is a nicely designed framework, but the association with Struts (which is actually an almost completely different framework) may have doomed it.

Almost everyone using Spring for DI seems to be leaning toward Spring MVC these days, probably because they don't want to do too much pick-and-choosing. And the default choice for a DI framework seems to be Spring as well, which means a Java programmer is now a Spring programmer.

This is probably why the "java cookbook" style books haven't been updated since 2004. They're treated as an evolutionary dead end, though I don't think they should be.

<comment><AUTHOR> You hit the nail on the head. Java EE programming is consolidating into Spring programming. I think it is because Spring gives you a layer on top of the app servers that finally achieves the write once run anywhere as long as you stick with Spring. That part is good but it is a shame that you need so much _stuff_ to achieve this. I always cringe when maven pulls down all spring jars (20 or 30 ???)

</comment></comment></comment></comment></comment></comment><comment><USER33> It all comes down to what kind of software you intend to make (and frankly, who you intend to make it for). If you want to write a 3D video game, Python and Ruby aren't exactly your best bet for example. Likewise, if you're inside some company with a JVM mandate, your options can be limited as well. I can only comment on web app development since that's what I do most. My advice would be to pick up Ruby (and Rails) or Python (and Django). You might also try out Scala. Lift appears to be a pretty nice alternative to the morass of heavy Java web frameworks, though it's much less mature than something like Django or Rails. Coming from Ruby and Python though, when I work in Scala, it still feels a tiny bit heavy to me. I think for you, a clean break from the Java world sounds like it's what you need.

Managing a substantial Python (or Ruby) project is easier than you'd imagine because there is so much less code and configuration. There is also less "architecture astronautism" with all the layers of abstraction hiding what's really going on. You can still have some of that, but in my experience, it's pretty rare.

The biggest issue when stepping outside the JVM (in my opinion anyway), is dependency management. The libraries you want may often not be pure Python or Ruby, but have C/C++ stuff in there too. This can make setting up an environment on multiple OS platforms tricky, since you need to install (and maybe even compile) all that stuff. There's something to be said for throwing a jar on a classpath and being done. However, I suspect you'll find these languages cut development time so much that you're still ahead of the game after burning a little extra time installing some dependencies.

Performance-wise, both Python and Ruby are probably "fast enough", certainly when developing apps that are not used by large numbers (i.e. web-scale numbers) of people. Internal apps in particular run perfectly fine with no exotic caching, partitioning, parallelization, etc... There are also plenty of companies out there that operate very busy, successful public websites with both Ruby and Python, so in general, the performance should be the least of your worries. Obviously, if you're looking to do scientific simulation or some other compute-heavy work, your mileage may vary.

Editors are another thing that trip people up going to Ruby and Python from Java. Take my advice: ditch your IDE and use a regular text editor with syntax highlighting. There's no way I write Java code without an IDE, but for languages like Ruby and Python, it's not necessary and the IDE just gets in the way. Keeping an interpreter window open when dealing with a library you haven't used before is far more productive. You can create some fake classes, try out some methods, and once you have a feel for the thing, move over to your editor and code up what you want. That beats the pants off autocomplete any day (and the inevitable compile, run, test cycle that goes with it).

EDIT: Oh, and learn JavaScript if you don't already know it. It's only going to get more important.

</comment><comment><USER34> Do you live in NY?

<comment><AUTHOR> no, I'm in the high tech mecca of South Carolina. New York is frightening to us southerners.

</comment></comment><comment><USER35> Delicious Bookmarking site I believe is Django/Python

As far as scaling to a big enterprise project, not sure yet.

Given your java background have you compared groovy/scala/erlang to python yet?

While I do code android applications I am going through the same evaluation process for my server side development.

Groovy is nice in that I get to re-use Spring/Hibernate EJB, etc while having the features of an object oriented scripting language DSL and Grails has a good set of MVC features.

Python seems a little rough if you are re-using legacy java however jython does function and I guess one could build up jython stuff to handle legacy java enterprise.

Scala and Erlang seem interesting both attempting to solve same and similar problems in different ways implementation language wise.

Zed Shaw has some notes on enterprise coding with python, which are worth a read. I would also not rule out new C++ frameworks as Google still uses a lot of C++ in enterprise with good results.

</comment><comment><USER36> i wanna get software</comment>


The illegal city of Somerville - <AUTHOR> http://cityobservatory.org/the-illegal-city-of-somerville/ <comment><USER2> We're talking about this a lot in Cambridge and I'm hoping to put together an analogous map for us. For example, here's a map of parcels where the floor- area-ratio exceeds 0.75: [http://i.imgur.com/D9m9Gx2.jpg](http://i.imgur.com/D9m9Gx2.jpg)

Most of our residential zones are currently zoned with a 0.5 or 0.6 cap.

The local NIMBY group has been petitioning the zoning board for more restrictions: downzone an entire neighborhood, add setbacks and more area restrictions along the main thoroughfare. Meanwhile, everyone who isn't affluent or in subsidized housing is getting pushed out to the surrounding towns.

<comment><USER3> The only thing I wish on NIMBYs is for them to spend a decade in a Soviet queue for apartments.

This shortage is _man-made_.

<comment><USER4> Everyone is a NIMBY in their own way, it's just a difference of how much annoyance you are willing to tolerate. Most people wouldn't want a noisy factory or a smelly dairy next door, for example, but those things have to be _somewhere._

Now imagine you spent a lot of money to get a house with a nice view. Suddenly Larry Ellison decides to build a skyscraper next door, which blocks the sun on your property every day. You can't even grow flowers anymore because there's not enough sun. Some of your trees die. Are you happy?

Now imagine you spent a lot of money for your house. A housing company proposes changes to the neighborhood that will reduce the value of your house by 20%. In other words, you will be working and paying for years on a portion of your house that no longer has value. Are you happy? Well, maybe you can handle it because you're rich.

So these are the kinds of things that go through the minds of NIMBYs.

<comment><USER5> >Now imagine you spent a lot of money to get a house with a nice view. Suddenly Larry Ellison decides to build a skyscraper next door, which blocks the sun on your property every day. You can't even grow flowers anymore because there's not enough sun. Some of your trees die. Are you happy?

I have _trees_ now!? Flowers? Luxury! My current apartment _doesn 't_ get enough sun to grow plants that need sun. And we pay $2200/month for a two- bedroom apartment here.

<comment><USER6> Wow $2200 for a 2 bed? Luxury! That's how much you'll pay for a studio here in Mission, SF... if you're lucky. (and I wish this were a Four Yorkshiremen reference[1]. No!)

[1] [https://www.youtube.com/watch?v=Xe1a1wHxTyo](https://www.youtube.com/watch?v=Xe1a1wHxTyo)

</comment></comment></comment></comment></comment><comment><USER7> I genuinely don't get the point. Of course the buildings aren't legal under current zoning laws. They weren't built under current zoning laws! We don't tear down every skyscraper whenever the earthquake requirements change. Nobody moves their house when the setback requirement goes from 8' to 12'. These kinds of articles are tautological.

edit: the article mentions "illegal neighborhoods and illegal houses" but doesn't say anything about the laws _when they were built_.

<comment><USER8> You're focussing on a nit. The situation is not "the neighbourhood is generally fine, but would need some tweaks for the fire code"

The situation is: it's impossible to build a neighbourhood resembling somerville under current zoning laws.

I live in a prewar neighbourhood in Montreal. It's dense, beautiful, and loved by locals and tourists alike. If you could clone it and build it elsewhere, it would be worth trillions to cities across North America.

But it's illegal to build, because the streets are too narrow, there isn't enough parking, there is a mix of residential buildings and businesses, the buildings aren't set back far enough, and so on.

<comment><USER9> Novelty brings value to things that would otherwise be junk.

We don't actually want narrow streets, lack of parking, and pedestrians looking in our windows. The novelty makes it cute though.

If neighborhoods like yours were common, they would have no value.

<comment><USER10> As a resident of near-downtown Boston, I want cars out of my neighborhood, ideally the entire downtown. I love the wide sidewalks and want bigger ones. Mostly I'm jealous that we can achieve neither the efficiency nor the beauty of transportation in Central European cities like Zürich because the suburbanites, their remote matchboxes, and their eyesore parking garages are obstacles to every proposal to improve (or even maintain) public transportation. To choke those folks out of the area with narrow streets and zero-car zones would be a blessing.

Although a more effective solution would be to scrap zoning laws and actually make the suburban blight towns convenient for workers and pedestrian residents.

<comment><USER9> If you got narrow streets, they'd be bumper-to-bumper spewing exhaust. You would be unhappy.

If you excluded cars, the place would turn into a downtown version of a strip mall. (expensive tourist trap) There would be no jobs other than things like waiter, retail clerk, manicurist, etc. -- is that how you wish to be employed?

You are focusing on the bad of cars, and ignoring all the benefit they bring. They even bring benefit to people without cars. Heck, you can rent one. I bet you've done it.

<comment><USER11> Consider Delft and Leuven. Two small vibrant cities, near Rotterdam and Brussels respectively. Both don't have a lot of cars in their center, are completely walkable, both are wealthy cities, both are not tourist traps, both offer employment for all ages from retail clerk to PhD computer chip researcher, they are most certainly not outdoor strip malls. Those are just two examples that I know personally, but there are hundreds more the world over.

Cars indeed have benefits, but they are noxious to cities. In my experience, the fewer cars there are in the city, the more pleasant that city is. And as the above examples demonstrate, that doesn't mean you are suddenly killing the economy or your job prospects.

</comment></comment></comment></comment></comment></comment><comment><USER12> I live in Waltham... I can tell you Waltham is not far off from Somerville. With Waltham we have the added complexity of having lots of mixed commercial and residential zones (Somerville on the other hand is mainly residential). Waltham is also more diverse than Somerville economically (Somerville has a large amount of college kids that skew the demographics). Waltham has a lot of first generation Americans that are afraid to report violations or just don't know that they can. I have seen single bed apartments with serious safety issues housing families of eight people and more.

Almost every house in my neighborhood is in some sort of serious violation. In my small neighborhood (called the Island neighborhood) we have had 3 fires. That is three houses that have had fires substantial enough where they pretty much need to be demoed (luckily not the large family mentioned previously).

Nobody has wired smoke alarms but every three family or above requires it. You are not supposed to have grills on any balcony or porch... everyone does... Somerville is massively guilty of this as well. Proper egresses... haha use a window.

Such is the style of living in ancient New England houses in high density areas.

There is very little incentive to update or even try to correct behavior legally. I'm not sure how towns like Somerville can get their landlords (I am landlord so I am guilty as well) to update their properties. I do know lots of people updated with the federal energy subsidizations.

It would be nice if their was some safety subsidizations to maybe start turning this around (along with the rest of our crumbling infrastructure).

</comment><comment><USER13> Somerville is not necessarily typical, though. Not sure if it is still true, but as of a few years ago it had the highest population density in all of Massachusetts. Higher than Boston, higher than Cambridge, higher than Worcester. Introducing it as an ordinary suburb of Boston is perhaps a little misleading.

<comment><USER14> Judging by the pictures in the article, Somerville looks very sparse. And that's already the most dense?

<comment><USER9> Yes. It's houses next to Boston. Boston itself has other stuff. People aren't supposed to live in the convention center, baseball stadium, or airport.

</comment></comment></comment><comment><USER14> I wouldn't want to live there. It's too sparse and suburban for me. (The kind of city I like is even more illegal in America.)

<comment><USER15> Lived there 2 years, it's neither sparse nor suburban. It's the densest city in MA.

<comment><USER14> I judged only from the pictures in the article. I saw lots of freestanding houses three story houses and wide streets.

Compare eg this random edge-of-city in Germany [http://kultur-in- krefeld.de/medien/uploads/2015/01/KiK-Dreif...](http://kultur-in- krefeld.de/medien/uploads/2015/01/KiK-Dreifensterhaus-I-Kopie.jpg) It's not Manhattan by far, just a bit denser. And this is not a city centre.

(Alas, they don't have Google Street View in Germany.)

<comment><USER16> Almost none of the houses in the article are of "free standing houses" (at first glance, there's only one building that might have been a single family).

That's just how multi-families and condos look in the area.

</comment></comment></comment></comment><comment><USER17> How does this affect resale? I know when I sold my house the buyer's agent insisted that we bring it up to modern code first, and that involved some rather expensive retrofitting of the house.

<comment><USER18> The article is discussing zoning codes; not building codes. Different issues entirely.

It's not uncommon to find that you'll need to retrofit an old building to match current fire safety laws, etc. My family recently had to rip out a bunch of old electrical outlets and replace them with newer ones that were deemed safer.

Nobody requires you to match current zoning laws.

<comment><USER19> As long as you can get a Certificate of Occupancy (which in my town requires smoke and CO alarms only), I'd never cure a building code violation in a building I was selling (certainly not in the current Cambridge/Somerville market).

You want the code violation cured? No problem; I'll take one of the other 17 offers.

</comment></comment></comment><comment><USER20> Isn't there something like a "Bestandsschutz" for buildings? I couldn't find a fitting translation, it basically means, if you got a legal permit for building something and the rules are changing, your building is still legal. Which means that a town can only change the building code for the future, not for the past.

On a side note, somewhere I heard or read that many US cities and town don't allow mixed use zoning, so that a building can used commercial and residential. Something which is very common in German town, especially in downtown areas, you have a lot of stores in the ground level and above that are flats.

<comment><USER21> That is Somerville's biggest problem right now: very tight and inappropriate zoning and building regulations, but they only take effect in if you demolish your house and build something new. So Somerville is frozen in amber.

A few years ago, I saw developers in Somerville get around that problem when they wanted to replace one 3-apartment house with one exactly the same shape, minus a whole lot of rotten wood, and plus a whole lot of good insulation and the like.

So instead of tearing the building down and building it anew, they tore down half of it, all the way down to the foundation, then removed all the parts connecting to the foundation, leaving half of the building on stilts, and then started building the new building, with the shell still in place.

They did good work. They replaced a well-designed but badly neglected building with one that is also well designed and more liveable. They should not have had to do this charade that they were just "renovating" it, but that was the only way to do it legally.

</comment></comment><comment><USER22> Personally I would love to see a suburb go completely rogue and draft up zoning laws that flipped the script and required their town be built to 1890's code.. or better yet, 15th century Europe code.

Victorian era density is nice but we have so few places in the USA that have any of the human-scale character of the Old World to pull from, that most Americans have no idea what a small walkable village really should feel like. If we want to talk about the good old days before postwar zoning in order to get the character in our places back, why not look at the places that are real gems that we never had at all, like UNESCO villages and such?

<comment><USER21> Massachusetts is doing that. Every outlying town is now required to select an area where they will now zone for denser housing with offices and shops. If they don't, Beacon Hill (the state government) will select it for them.

It's still not going to be completely European (the early American settlers built streets wide for fear of fire, and because they really, really liked being able to do U-turns with horse carts,) but American 1890's style is well worth cherishing on its own merits.

<comment><USER12> They are even doing it in the rich suburbs of MA like Wellesley. Wellesley and Newton are trying to stop tear down McMansion mania and our passing laws that you can't knock and rebuild unless you have lived there for a while or have an "accident".... I predict more fires in the coming years...

</comment></comment></comment><comment><USER23> Somerville is in the process of updating its zoning code: [http://www.somervillema.gov/zoning/resources/2015-01-22-ordi...](http://www.somervillema.gov/zoning/resources/2015-01-22-ordinance- boa-submittal.pdf)

My impression is that one of the goals of updating it is to make much more of the city be zoning conforming.

</comment><comment><USER24> FWIW the City of Somerville recognizes this and is working to reform the zoning code.[1] Here are some highlights from the proposal:

 _" Makes Somerville a national leader in using zoning to produce affordable housing with the most ambitious inclusionary housing requirements in the state"_

 _" In areas of the city where major new development is planned, up to 20% of new units must be set aside for affordable housing."_

 _" Ensures that infill development fits into the form, scale, and pattern of existing neighborhoods and squares."_

 _" Only permits formula businesses and big-box stores by special permit."_

 _" Requires new buildings in certain districts... to set aside 5% of gross floor area as leasable arts and creative use spaces."_

[1] [http://www.somervillema.gov/zoning/key- changes.html](http://www.somervillema.gov/zoning/key-changes.html)

<comment><USER5> I don't see anything there that, strictly speaking, requires them to actually build dense housing. Setting aside 20% of suburban development for people poor enough to qualify for "affordable housing" subsidies just creates a welfare cliff.

</comment></comment><comment><USER25> Somerville needs more highrises and more subway trains.

<comment><USER26> I'd tentatively agree on the subway trains.

<comment><USER27> There's no solving the housing problem without more transit. You're just not going to ever have enough housing here for everyone to live in one place, zoning or no zoning. So: people need ways to get from one place to another. More cars? No. Then you need more roads, more parking. Where are they going to go? Guess what? Some people are going to end up in Malden, Medford, Everett, Revere, etc. So what? Is that so bad? Not if you have a way to get to work in the morning. I'm old enough to remember when we lived in Somerville because it was cheap. The Red Line and the end of rent control in Cambridge brought a lot of gentrification to Somerville. Transit is absolutely necessary in a dense urban area (and yeah, Somerville and Cambridge are already among the most densely populated cities in the country.

Another thing is that people use more space now: Before WWII, these cities had more people living in fewer units of housing. We've gone from 4 per unit to 2. As you make more housing available, people want more of it. That's why there's never enough no matter how much you build.

</comment></comment></comment><comment> gm-conspiracy Don't get me started on classic automobiles.

</comment><comment><USER28> The way people use land varies a lot of with time but the laws created by all wise bureaucrats don't. SF and bay area in general has been classic good example. The government attempts to solve problems creating by zoning law is to create more zoning laws eventually becoming an overfiting problem.

</comment><comment><USER29> Url changed from [http://www.vox.com/2016/6/16/11948630/somerville-zoning- ille...](http://www.vox.com/2016/6/16/11948630/somerville-zoning-illegal), which points to this.

<comment><USER2> Thanks, dang. The Yglesias post is basically a regurgitation of our discussion on /r/boston.

<comment><USER30> At least its not the globe tho

</comment></comment></comment><comment><USER31> They should demolish it...

[https://en.m.wikipedia.org/wiki/Kowloon_Walled_City](https://en.m.wikipedia.org/wiki/Kowloon_Walled_City)

<comment><USER32> Did you even read the original article?

<comment><USER31> Of course, and I was jokingly pointing out a slight similarity between Somerville and the famed Kowloon Walled City, which was demolished because of its extreme density (3.25 M inhabitants / square mile vs. 18K inhabitants / square mile for Somerville).

Basically, is it possible for the mores to change so much (as reflected in the zoning codes) that not only would the city be illegal to build now, but that it should be demolished? What happened to Kowloon suggests that it is.</comment></comment></comment>


Pasco's sheriff created a futuristic program to stop crime before it happens - <AUTHOR> https://projects.tampabay.com/projects/2020/investigations/police-pasco-sheriff-targeted/intelligence-led-policing/ <comment><USER2> America, land of horrors.</comment>