Looking forward to better interop with JS, but can't help feeling a bit sad.
40 karma · joined September 6, 2012
Looking forward to better interop with JS, but can't help feeling a bit sad.
It ruined things for me, most everyday tools and languages look messy and inelegant next to Smalltalk.
Regardless of persistence, using such "manager" objects to operate on data records is procedural rather than object oriented programming.
I'm not sure if this is what you meant, but here is how polymorphism along with the double dispatch pattern would work: NaiveActor#handleLifecycleMessage will need to delegate to the event subclass, which will in turn select the appropriate method on NaiveActor.
Example of subclass of LifecycleMessage:
class ExitMessage implements LifecycleMessage {
@Override
void handle(BasicActor actor) {
actor.handleExitMessage(this);
}
}
In NaiveActor: @Override
protected void handleLifecycleMessage(LifecycleMessage m) {
m.handle(this);
}
@Override
protected void handleExitMessage(ExitMessage m) {
if (Objects.equals(m.getActor(), myBadActor) {
System.out.println("My bad actor has just died of '" + m.getCause() + "'. Restarting.");
spawnBadActor();
}
return super.handleExitMessage(m);
}
It's been my experience that many developers resort to instanceof or enum type flags because they don't believe polymorphism actually works in real world situations such as this.It would be interesting to pair this with Nokia's high megapixel crop-zoom.
At what point will early obsolescence distort the supply of willing workers and compensation demands?
The rest of his argument is based on convenience alone and rather weak. A YubiKey, nice as it is, doesn't help with mobile devices, where transactions are increasingly taking place.
http://docs.python.org/2/library/itertools.html
def pairwise(iterable):
"s -> (s0,s1), (s1,s2), (s2, s3), ..."
a, b = tee(iterable)
next(b, None)
return izip(a, b)One connection that pushes aggregated social networking data saves the need for a multitude of apps constantly polling or keeping their own open commections to various services.
BlackBerry also provided similar services as part of their BIS plan. It would poll Gmail and Exchange servers from its own servers, and push compressed data to the device.
Also, remember that these services existed at a time of slow networks and devices and a lack of support for it from Google. At the present, it's becoming increasingly clear that only few companies have the expertise and trust to do this securely. Motorola is probably not one of them.
In production code, no matter the language, you have to guard against these issues. The nice thing about typed objects (immutable, anyway), is that once constructed and validated, they do not require tedious validation at every method and client they are passed into. That actually results in less boilerplate, and less test writing.
So just remember, Java always assumes your code is production-bound and requires upfront planning and checking. That's why it's unpleasant to prototype with.
Another example is the inability to just read a local file into a string with a simple API call. It's this way, again, because in production the program has to reason about paths and file systems and can't make assumptions about the validity (or size) of the file you just want to load and play with.
In production code, no matter the language, you have to guard against these issues. The nice thing about objects (immutable, anyway), is that once constructed and validated, they do not require tedious validation at every method and client they are passed into. That actually results in less boilerplate, and less test writing.
So just remember, Java always assumes your code is production-bound and requires upfront planning and checking. That's why it's unpleasant to prototype with.
Being offered Eclipse/Netbeans tools is the equivalent of getting a Dell laptop for work.
Or is CS a good fit for only a limited number of people, regardless of price?
It's fascinating that this field, which is difficult because it requires precision, lends itself so practically to automatic grading online.
As exciting as MOOCs are, will we be bound to use them in what's left of our free time just to keep up?
The trick is to make supporting IE 6 cost effective. You can still use semantic markup and CSS layout, it would just be a simplified version of what you serve modern browsers. It's called graceful degradation, and with a well defined templating system, it's feasible without laborious adjustments and hacks.
Some enterprises really can't upgrade, and if you are willing to support that one troublesome browser, you can still sell the product behind it, which can be innovative and useful.
The Nexus 4 is sold at a loss or barely break even, following the same model as Amazon's Kindle line. It's a class of devices sold using a different business model, regardless of Android.
It remains to be seen whether these can be manufactured at scale--it costs to commit to large scale production, which can be seen in LG's inability to deliver Nexus 4 devices at launch. And it is also doubtful that they can remain competitive over time. Other loss making devices such as game consoles don't see frequent hardware revisions.
In the dev console you can see that this script actually failed to load.
1. Examples using outdated low level concurrency primitives such as wait and notify. Use of java.util.concurrent would have made the code much more terse and safe
2. Java performance affected by use of the outdated java.util.Stack class. It is well known that this class uses redundant synchronization. The docs recommend using a Deque implementation instead.