1,147 karma · joined July 14, 2011
As a highly-skilled South African (which, interestingly enough, appears to be where parent ultimately decided to emigrate), the effort, duration and uncertainty involved in acquiring US citizenship makes it a non-starter option for me.
I'm better off remaining in South Africa where I don't have to work non-stop for years and years unless I want to risk being deported, don't have to play a different game in the job market, can stop working at any time to go full speed on my startup, etc.
Eventually I hope to be successful enough that emigration through business and wealth is a simpler and more direct option. Of course by then I may very well have a family and other commitments that again make emigration a non-option.
Assuming I'm the sort of person this reform is meant to entice into the USA (a country I very much admire), it certainly isn't comprehensive, which appears to be parent's point.
An "Islamic gay man living in Tehran" in 1997 creates a web page and populates it with exactly the same personal information you are describing. Sometime later Google comes of age and indexes his site for the world to easily discover.
Do you feel that Google and Facebook are acting differently in this scenario, and if so, why?
If so, this data point is most likely somewhat deceptive. The core competency of a marketing or design agency is creative work, and naturally you want exceptional talent in that respect. Such an agency is generally going to be building straightforward websites that don't require particularly skillful software engineering. (And even if they did, it'd be an option to contract out, whereas contracting creativity out is not - as far as I know - a real option.)
If you look at the salary of an equivalent "Head of Development" and "Head of User Experience/Design" at e.g. Microsoft I suspect you'll see the opposite salary situation because of the relative focus of the organisation (although Microsoft is putting a lot of emphasis on design these days so who knows?).
While what you described may happen somewhere, the pattern in banking systems that I've seen is pretty straightforward and simple to reason about: a cash flow produces two ledger entries within a transaction and is committed with no concept of distributed rollback.
If there are problems with some sort of subsequent step (e.g. the actual dispensing of cash in ATM or invalid routing instructions in a cross-border payment), the original cash flow is reversed with a reversal of the original two ledger entries -- which is precisely what Ayende saw on his statement.
If a correction is also required in addition to the reversal (perhaps SOME of money was dispensed before an ATM loses power), the correction will be encapsulated with another pair of ledger entries.
(These various cash flows will then typically be placed on a payment bus for further processing by various other systems that perform recon, liquidity management, etc. Again, there is no distributed transaction, just simple double-entry accounting and straightforward transactional message queues.)
The clever bit is that the consumer (e.g. a web callback or UI event handler) of IArticleService is not the constructor of ArticleService. The consumer simply receives a reference to an IArticleService and uses it, while the constructor of the service knows how to wire things up and hand out service references to consumers that need it so that the consumers don't need to know how to do the wiring up; this is precisely what a dependency injection engine does.
It's the difference between you walking to a Post Office and saying "mail(this envelope)" and you saying "mail(this envelope, put it into truck x, route it via [A, B, C, D], find it in the corner of truck D weeks later and route it through E, give it to Alice to give to Bob to place it in the customer's post office box)". Somebody constructed the Post Office with all these rules encapsulated and you just consume the service.
It's the reason society can scale despite nobody knowing how everything works exactly, and the same principles apply to creating maintainable code that scales among many developers of varying degrees of skill.
If you're passing in DateTime.Now to your Publish method then the caller (probably a UI element or a web callback) is implementing business logic that does not belong to it, which violates the single responsibility principle and will eventually cause your code to become unmaintainable.
Part of the problem with these posts is the authors seldom have experience building software in some of the more tricky real-world software development environments. While DHH is rightfully respected for many things, I can find nothing in his history [1] to suggest he has the relevant experience to criticise "enterprise development": as far as I can see, he's never had to work on a millions-of-lines code base with 3+ years of cruft written and maintained by large disparate teams of mediocre developers using poorly chosen technologies to solve problems within time, quality and scope constraints outside his control.
In these sorts of environments, saying "start over" or "choose better" is not an option and things like DI and well designed interfaces make it possible for a small team of architects to ensure the mediocre developers actually accomplish something and software gets released.
I'll repost what I posted yesterday on the other post:
interface IArticleService {
void Publish(int id);
}
class ArticleService : IArticleService {
protected IArticleRepository ArticleRepository;
protected ITimeService TimeService;
public ArticleService(IArticleRepository articleRepository, ITimeService timeService) {
ArticleRepository = articleRepository;
TimeService = timeService;
}
public void Publish(int id) {
ArticleRepository.Publish(id, TimeService.Now);
}
}
Some features of this design pattern:- the consumer of the service doesn't need to know anything about the publish time: e.g. whether it's UTC or local time, whether it needs to have +1 second added to deal with a bug in some legacy interface, or perhaps a switch to database time, etc. The problem of "publish time" is strictly limited to the ArticleService, which is an expert on the matter of publish times.
- any new business rules regarding publish times or Publish-related activities are strictly limited to this service and none of the consumers have to be modified when the rules change
- the ArticleService is easily testable by swapping in one or more testing ITimeService implementations (e.g. one that returns a fixed test date time, one that returns bad times, etc.)
- your software has a consistent, single view of time (which is critical in a time dependent application, for example)
There's good reason to believe that such a world would be unstable. When too many people are willing to take advantage of too many other people then you will most likely have a tragedy of the commons [1]. Co-operation and altruism appear to be very important components for the evolution of species and the advance of civilization.
> After all not all psycopaths are criminals
This is true, and as with most things in life what's important is balance. As the article discusses, psychopaths tend to live "in the now" and have a very present-oriented time perspective, which certainly has some value. But too much of a particular time perspective, in this case with no past- and future-oriented time perspectives, creates a distorted map of reality [2].
[1] http://en.wikipedia.org/wiki/Tragedy_of_the_commons#Applicat...
Java: 1995 [2]
Scala: 2003 [3]
Clojure: 2007 [4]
Unless these hypothetical developers of yours are time travellers, your proposed solution wasn't an option for more than half of Java's life. Sometimes Java is 90% of what you need and you just get on with the other 10% because the alternative (learning a new language, finding a new team or training an existing team to use it correctly, etc.) is simply not worth it to anybody with real world time/quality/scope constraints.
[1] http://en.wikipedia.org/wiki/Design_Patterns
[2] http://en.wikipedia.org/wiki/Java_(programming_language)
[3] http://en.wikipedia.org/wiki/Scala_(programming_language)
How so?
> Wanna unit test? Pass in a modified function giving back the time you want.
Right. And all DI does is make it possible for the following constructor to be invoked without special knowledge or adverse coupling:
interface IArticleService {
void Publish();
}
class ArticleService : IArticleService {
protected IArticleRepository ArticleRepository;
protected ITimeService TimeService;
public ArticleService(IArticleRepository articleRepository, ITimeService timeService) {
ArticleRepository = articleRepository;
TimeService = timeService;
}
public void Publish(int id) {
ArticleRepository.Publish(id, TimeService.Now);
}
}Some examples from my own life, a more modern context:
- acquaintances ask me to "fix their Internet" because I'm "good with computers": I point out I have other priorities and they're already paying the line provider/ISP so should call them for assistance
- similarly, people who ask me to fix their computers: I point out that they wouldn't expect a mechanic to fix their car for free, and besides IT != software development
- back in university when people asked me to help develop or debug portions of their solutions: if I couldn't figure it out in 15 minutes I told them I had other priorities but gave them general advice about what the problem or solution might be
- people asking me to work longer for the same amount of pay and unpredictable benefits (i.e. bonus formulas): I became a contractor instead and I've been immeasurably happier for it
You simply cannot consent to every request from such people - they will literally drain your life (i.e. time) from you, to what end?
"Safari", to me, is a word foreigners use unnecessarily and some locals chuckle at when they hear it. Locals simply say "We're going to Blahblah National Park for Christmas." It's also the name for a brand of dried fruits and nuts, which makes it even weirder to hear it in conversation here.
I honestly didn't grasp the relevance of the name to the Internet until you explained it now, despite programming for over 15 years and living in Africa for over 29 years.
Also the first game I learned to 'hack', and it's what set me on the path to learning programming: I discovered a hex file editor on a floppy and had a hunch about how things might fit together.
So I saved a game, waited a second until some money was spent in the game and then saved again into a different slot. Thereafter I went through the two save game files, visually figured out which parts were different between the files, changed the magical numbers I saw, reloaded the game and slowly figured out how to make myself rich :)
(This worked much better than my earlier attempt with the disk editor I found where I thought I was really clever compressing files by changing their size to 0.)
[1] www.psy.fsu.edu/~baumeistertice/goodaboutmen.htm
It's an interesting question in evolutionary theory whether there is an advantage to have a split of "breeders" and "non-breeders". Non-breeders, people who don't mind being e.g. soldiers and mine-technicians, seem pretty useful to society (actually a necessity once a large enough population of violent "non-breeders" evolve to threaten the breeders).
However they don't really contribute much genetically unless perhaps the "breeder" vs. "non-breeder" flag is entirely random and therefore allows for certain individuals to randomly specialize without negatively affecting the genetic potential of a family of mutations.
Intuitively, the value of "non-breeders" would seem to be very... expendable. I doubt people who are against having kids would enjoy that label, though. I wonder what other evolutionary value non-breeders bring to a species.
Perhaps having non-breeders who divert all their energy towards science and progress produce such an important species advantage that even if they don't necessarily contribute to the genetic pool they do contribute to the overall preservation and extension of the underlying genetic code.
1. A woman forced into motherhood by a partner who refuses to allow her to terminate the pregnancy
2. A forced mother (rape, abandonment) who was unable to opt for termination for whatever reason
3. A stay at home mother who thinks its too much hard work (as compared to...? We never find out what their expectations are)
4. A resentful mother with the wrong or unsupportive partner and whose anger and resentment towards said partner may now be directed at everything related to them (e.g. children)
5. Women who had children "too early" and feel resentful missing out on youthful freedom
6. Women who miss their youthful freedom
Etc. Some of these are quite understandable, some appear to be naivete, and some appear to be pure laziness or a lack of responsibility (i.e. deficiencies in moral character).
"Object-oriented programming [...] is a powerful idea. It truly is. But it's not always the best idea."
The problem is the opionated flamebait title submitted to Hacker News, the text of which is nowhere to be seen in the Google+ post itself.
Watching the YouTube video you linked it doesn't look like he seems to enjoy the T-Mobile product placement. Have I been brainwashed into liking him because of my earlier experience?
Have you seen Dragon's Den (UK)? I saw Shark Tank first and thought it was great but the more hardline Dragon's Den grew on me and I believe I learned much more from it.