Even in lowly Java, they later added to Optional the orElseThrow() method since the name of the get() method did not connote the impact of unwrapping an empty Optional.
I've found both methods very useful. I'm using `get()` when I've checked that the value is present and I don't expect any exceptions. I'm using `orElseThrow()` when I actually expect that value can be absent and throwing is fine. Something like
if (userOpt.isPresent()) {
var user = userOpt.get();
var accountOpt = accountRepository.selectAccountOpt(user.getId());
var account = accountOpt.orElseThrow();
}
Idea checks it by default and highlights if I've used `get()` without previous check. It's not forced at compiler level, but it's good enough for me.
When I worked at Khan Academy, Charlie was an intern, and for a few months we worked together on building the KA app for Android. I can vouch that he was a damn good developer then, and I'm sure he's a much better one now.
Yeah, but it's the rank and file employees who will now think "I'm not there to defend myself against being fired if I take maternity/paternity leave" who will suffer most. The ones who won't be getting a severance larger than you can ever imagine.
> Yeah, but it's the rank and file employees who will now think "I'm not there to defend myself against being fired if I take maternity/paternity leave"
If an executive is gunning for a rank and file employee, there is no defending yourself except through wrongful termination lawsuits, etc. Being sat in the office when it happens won't help you save your job from an executive that wants you gone.
Every other theory listed here is far more likely, but I would try changing your loop from using System.currentTimeMillis() to using System.nanoTime(). It's a higher-resolution time source that has no relation to wall clock time but is more appropriate for timings. Classes like Stopwatch from Google's Guava use it.
Agreed. Joda had the right abstractions (instants, durations, etc) but the class hierarchy for them was unnecessarily complex. A lot of this complexity comes from opting for the abstractions to be either mutable or immutable.
For example, `ReadableInstant` [1] in Joda implements 3 interfaces and has 7 subclasses. And really, what is the difference between `AbstractDateTime` and `BaseDateTime`? Whereas `Instant` from java.time [2] is an immutable value type and I haven't found it lacking in any respect.
On the whole java.time has struck me as extremely well designed (after coming from Python and previous date and time libraries in Java) and I think it would behoove other languages to liberally copy its design.
I have a horrible memory when it comes to the detail of books, movies, etc. (But thankfully I can remember what I've coded, or else I'd probably be out of a job.)
I mostly read non-fiction. To improve my recall over the past 7 years, I type up notes as I read. It's made the process of reading much slower, but it has helped when I've needed to recall some example or detail or framework of a book.
I did this (selfishly) for myself, but decided to upload my notes at https://github.com/mgp/book-notes. (Shameless plug I suppose?) The README explains exactly how I take the notes – but essentially there's no shortcut. I have my text editor open and simply type notes as I read.
Hey cool — I use a very similar practice of writing up notes in Markdown. Although I haven't published them, this is inspiring me to do so!
One thing I do differently - I read the book through first, making highlights and shorthand notes anywhere I see something interesting. I do a faster, second read-through at my computer with the Kindle annotations and the text editor side-by-side. As you said, doing it at the same time slows things down tremendously, and I found that it sapped my momentum and I got fewer books read overall. Do you experience the opposite, or is it something you learned to work through?
Very cool! It's been a few years now that I started taking notes more systematically too. I mostly use the Notes app on Mac OS, and to a lesser extent README.md/github. Unfortunately, Notes is a bit limited compared to markdown in a specialized editor, but it's just very convenient.
So far, my notes concern mostly technical and work related stuff, but I should follow your lead and take notes for non-technical material.
Very cool, thanks for the link to your notes repo. I share your pain with a horrible memory. I may very well start taking notes and storing it similarly to how you've done it.
> Project Lombok hooks itself into the compilation process as an annotation processor. But Lombok is not your normal annotation processor... The trick is that Lombok modifies the AST. It turns out that changes made to the AST in the Annotation Processing phase will be visible to the Analyse and Generate phase. Thus, changing the AST will change the generated class file.
That said, we never encountered any Lombok-related problems when running services in the cloud or locally. And the Lombok plugin for IntelliJ is good enough in that the auto-complete will "see" the Lombok-modified version of the file. For example, using the @Value annotation creates an immutable value type, which among other things a) makes every field private and final, and b) generates a getter method for each now-private field. With the Lombok plugin, IntelliJ auto-complete will a) not auto-complete the composed fields which are now private, and b) auto-complete the generated getter methods.
I highly recommend looking past the voodoo bytecode manipulation and using Lombok. The @Value annotation alone is worth the price of admission and made me a more productive programmer.
Oops! My mistake – you are absolutely correct. Lombok was just so pervasively used in our services, I assumed it came included as part of the Dropwizard toolbox.
Retrofit has support for RxJava, both of which are mentioned on the list. If Retrofit deserializes your JSON response payload as type T, then upon making a request it will return an Observable<T> that will either emit the result (if the request succeeds) or emit an Exception (if it fails).
Most Android applications that rely on both Retrofit and RxJava use them together in this manner.
As for too many requests pending, I'm not sure if OkHttp (which Retrofit uses for making requests and is again on that list) is configurable in that regard. If you want to handle it at the application level, you could maybe model the request queue to the network layer as an Observable<Request> and use RxJava's backpressure operators.
For more information on functional reactive programming (which I would call promises or CompletableFuture done better), see http://reactivex.io/
I'm not going to lie, I didn't like this post as much as I wanted to.
The author says that Google is making the same mistakes that LiveNinja made over a year ago. And that LiveNinja has learned a lot and iterated since then. At this point, I'm ready to believe that LiveNinja is the more mature product. That if I have a need, I should probably go to LiveNinja. I'm ready to be sold... But then the author does nothing. He don't actually tell me WHY LiveNinja is better. Instead, he mentions Google Answers, Buzz, and Wave.
Why not drop the ad hominem, and sell to your potential customers instead?
The target audience for posts like these is more often than not...(wait for it)...the person who wrote the post.
When a big company enters your space and becomes a competitor, the first reaction of many if not most founders is to worry. These types of posts are an effort on the part of founders to convince themselves that the larger competitor has an inferior offering and won't be able to compete effectively.
Incidentally, I think LiveNinja's biggest challenge is the same as Google's: its offering is way too broad. The fundamental purpose of these services is to aggregate "expertise" and market it to consumers on behalf of the providers of that "expertise."
To do that effectively, vertical focus is crucial. This is especially true if you're a startup, but it will also apply to Google unless Google leverages search and YouTube to promote relevant Helpouts providers.
The trader in me smells fear in this post, not confidence.
To (quickly) test my intuition I compared the language in this post with the last two [1,2] using the Flesch-Kincaid Grade Level (FKGL) statistic [3]. This statistic tends to decrease by 0.4 to 0.8 following trauma [4]. The original post was written with the sentence and vocabulary complexity of a 6th or 7th grader (6.9). The other two were more at the level of an 8th grader (8.4 and 8.8). Thus, we see a -1.7 change in the FKGL.
Seconded. I used to work at Betterfly which is in the same space and our lack of focus on a vertical ultimately really cost us. To our VC's credit, they always pushed us to pick a vertical--even if it was something completely random. Building a general product for everyone is super hard and you risk satisfying no one. When I moved on from the job to my own start-up, the single biggest lesson I took was to pick a vertical!
To be honest, I would be most afraid of not having the resources to compete, but at this point I began thinking, why not contact a Google competitor?
I mean, if he can prove that Google is way behind his work, then he has an advantage that may provide more value to a company that is interested in competing with Google and has the resources to justify competing at a bigger scale.
Why would he provide fodder to Google Helpouts product managers?
He is already 'selling' his product, by writing a blog, by making sure it showed up on HN and pointing out that his product is more mature and Google tried to 'get inspiration' from his product (by creating accounts on his website and probably browsing through features etc).
He has drawn enough attention so that potential users might now try it out for themselves and compare between his product and Google Helpouts.. He doesn't have to list out the features one-by-one that they have found through 2 years of being a live/running product that they believe are strong differentiators.
In any case, it wouldn't be the features that will lead to growth of such products. It would be the momentum they generate and mass they can gather that will feed itself and further increase adoption. Making it harder for any late comers to make any significant dent.
Also, he is probably leaving enough tantalizing info out of public, to possibly draw Google to the table for a possible acquihire. You can sense from the tone of his blog that he is neither being too harshly critical (that they copied his product) nor too solicitous of Google's products/services/prowess. Just setting the right amount of tone.
> Why would he provide fodder to Google Helpouts product managers?
Because the article has no actual content and sounds like self-congratulatory fluff. It doesn't convince me that LiveNinja is better than Google's offering. It convinces me that the author of LiveNinja cannot actually point to one concrete thing that they do better than Google.
Agreed. All this article really gives me is a brand comparison of both products. I know what to expect from Google, and Helpouts is probably familiar in the brand vein of Hangouts. However after reading this article I'm left with a sour brand impression from Liveninja. I get that vibe of nerd machoism from the tone of the article and the product name, ninja pirates and robots oh my.
Entirely seriously, their site has been top of HN for a few hours now. They don't care in the slightest whether the post make more sense, in fact probably better lay the HN counter-argument on a plate with a link-bait headline.
It's a thinly veiled marketing attempt and because we've voted up rather than flagged, it's worked. I'd have a big grin on my face in his position today...
They're never really going to make it big just by making it to the top of HN, are they? They seriously need to be looking at a bigger audience base than that... I presume the link has been making the rounds on reddit et al too?
That article is just a big bitch fest, or maybe it is just his toen I do not like. You could have summed what he says into 2 sentences. As you say, it would have been much more mature to have compared the 2 products, show why their product is better and done away with all the childish ranting.
Cut the guy some slack.. Imagine you just woke up to see Google is now your biggest competitor... I imagine this was written off the cuff and during a state of panic. Entrepreneurship is already a tremendous roller coaster of emotions and this I am sure was not helpful. The founder of LiveNinja doesn't seem immature to me. He built a great product and I am sure very passionate.
Sure, I feel for the guy and I'm sure they are very passionate people, I don't doubt that. But the problem with "off the cuff" on the internet is that lots of people read it and it's not in internet memory. They're running a business and sometimes you need to take the personal touch out of it a little.
What would have been better, from my perspective, would have been after reading the post saying "hey, these guys have a much better product that what Google has launched, it is much more mature and much more thought out. I think I'll give them a try and tell my friends to do the same". Turn a negative into a positive, that's all he can do at this point.
I went back and re-read it because at the end I still had the question of "Why is LiveNinja better than Helpouts" or "What is Helpouts doing wrong". I'm not weighing in on either side I just would like to know what he doesn't like about Helpouts.
I have mixed feelings, right now I'm experiencing a similar story with a project I have, and at this point I'm frustrated because whatever feature or differentiator I add, my competition takes it, at this point I feel like I'm the one shaping my competitor.
I can only spend ~4 hours/week to this project and I'm the only person behind it, whereas my competitor has ~20 active contributors, so I'm starting to get dismotivated enough to continue with the project...
Considering that my competition is stealing whatever I do, and considering that I don't have the resources to compete with them, I don't see much options...
My project is closed, their project is open. No party is directly involved in any money-related activity and there are many legal and political reasons behind this situation.
There is much backstory to tell, but my intention is not to deviate from the main thread, but to share that I can relate with the frustration of not being able to stand against a competitor due to lack of resources.
In my case it was more viable to give up since it was a "for fun project" (and the fun stopped when I had to take care about defending my work, getting a lawyer, taking care about how to license it, etc.), but I'm pretty sure that if the project were an important part of my career or my living I would have looked for options to save it.
Because the real audience is not some guy on HN, but the small number of people at Google who could acquire his company and might meet with him while he's at Google tomorrow?
I'm glad that he didn't...in a hopeful sense anyway. I would have preferred this post to come after they truly did crush google in this space, as I think it is an inspiration to the small/new guys who intimidate and bully themselves from ever doing something because they just think that google and friends will swoop in and do it faster and better.
I have my reservations, but I hope that these guys create a better product and end up being bought out by google in the long run.
But he doesn't spell out the ways in which LiveNinja is better, like others here, I was waiting for the comparison? He's deliberately held off on specifics to use it as a selling point for acquisition.
"Buy us and I'll tell you what we learned"
"Hey, we're better than you. We've been here for awhile, we've already solved the mistakes you'll be making. Oh btw, we won Startup World. Why don't you just acquire us already?"