Joshua Bloch Profile Banner
Joshua Bloch Profile
Joshua Bloch

@joshbloch

Followers
68,500
Following
204
Media
1,480
Statuses
17,037

Effective Java author, API Designer, CMU Prof, Swell guy, @joshbloch @mastodon .social

Silicon Valley
Joined July 2009
Don't wanna be here? Send us removal request.
Explore trending content on Musk Viewer
@joshbloch
Joshua Bloch
7 years
@FoxNews @jerrykuch You forgot: * Must be a complete waste of tax dollars * Must accomplish nothing useful
41
246
2K
@joshbloch
Joshua Bloch
3 years
OH: "British Python programmers be like 'import math as maths.'"
15
139
1K
@joshbloch
Joshua Bloch
3 years
I am elated to announce that the Supreme Court ruled today that API reimplementation is fair use. This brings a ten year odyssey to an end. I'll have more to say later when I've had time to read the opinion.
17
239
1K
@joshbloch
Joshua Bloch
2 years
Today I want to tweet about something serious: colorectal cancer. March is colorectal cancer awareness month, but that’s not why I’m tweeting today. After procrastinating 10 years, I finally got my first colonoscopy this January, at age 60. Turns out I should have done it sooner.
83
99
970
@joshbloch
Joshua Bloch
6 years
I just sent the final pdf for Effective Java, Third Edition off to be printed. I didn't sleep all that much in the past few days ;)
50
228
956
@joshbloch
Joshua Bloch
6 months
Thanks so much! I do intend to update the book, but first, I plan to write an API Design book.
@mnhocktweets
Martin Hock
6 months
For me it is the best Java book I’ve ever read so far by @joshbloch . If you a Java developer than I highly recommend reading it 🔥 I hope there will be a new update soon 🤞
Tweet media one
4
6
67
51
62
881
@joshbloch
Joshua Bloch
7 years
I'm (still) hard at work revising Effective Java. For the next week, Pearson is offering 40% off on preorders
Tweet media one
50
480
853
@joshbloch
Joshua Bloch
4 years
In a corporate blog yesterday, Oracle attacked 83 computer scientists (including 13 Turing Award winners) who signed an amicus brief defending our right to reimplement APIs, on the grounds that some of us accepted research grants from Google.
Tweet media one
22
412
707
@joshbloch
Joshua Bloch
6 years
Funny how incompetence and arrogance are positively correlated.
Tweet media one
7
344
683
@joshbloch
Joshua Bloch
6 years
This is Donald Knuth's sole tweet:
@realDonaldKnuth
Donald Ervin Knuth
8 years
If you optimize everything, you will always be unhappy #Knuth
16
391
1K
4
298
648
@joshbloch
Joshua Bloch
6 years
If you do not remember Jon Bentley's 1985 "Bumpersticker Computer Science" (perhaps because you never read it) drop whatever you're doing and read it now.
15
221
604
@joshbloch
Joshua Bloch
4 years
I recently stumbled on this blog post again. You should read it once a decade whether you need to or not.
18
223
588
@joshbloch
Joshua Bloch
1 year
This is your annual reminder that Math.abs(Integer.MIN_VALUE) is negative
15
66
515
@joshbloch
Joshua Bloch
4 years
Proud to be one of 83 computer scientists encouraging the Supreme Court to preserve our right to implement each others' APIs
18
132
506
@joshbloch
Joshua Bloch
6 years
This is your annual reminder that Integer.MAX_VALUE is prime
10
126
470
@joshbloch
Joshua Bloch
9 years
@jerrykuch @shipilev @AmbientLion Does anyone actually use LinkedList? I wrote it, and I never use it.
26
294
465
@joshbloch
Joshua Bloch
10 months
My mom, Renée Bloch (née Spira), passed away this week in Acton, Massachusetts. She was born in Antwerp, Belgium in 1932. This picture was taken by my dad at our home in 1986. (That's me on the left.)
Tweet media one
79
5
468
@joshbloch
Joshua Bloch
1 year
Sorry to interrupt the fun, but I'm deeply saddened to hear that Fred Brooks has passed away. He was a great man whose impact on our industry is incalculable. I'm forever indebted to him for his support in the fight for the right to reimplement APIs.
1
164
465
@joshbloch
Joshua Bloch
7 years
Come to your own conclusions.
@VP45
Vice President Mike Pence Archived
7 years
Outstanding afternoon. "I've often said there's nothing better for the inside of a man than the outside of a horse." -Pres. Reagan #VPinMT
Tweet media one
6K
10K
26K
10
84
402
@joshbloch
Joshua Bloch
2 years
I am happy to report that I'm home and feeling great, a mere two days after surgery! Thanks again to @AaronDawesMD and his team, and all of the other wonderful people at @StanfordHealth .
18
4
459
@joshbloch
Joshua Bloch
4 years
This is your annual reminder that Integer.MAX_VALUE (2³¹-1) is prime. It is the eighth Mersenne prime, discovered by Leonhard Euler in 1772.
2
74
426
@joshbloch
Joshua Bloch
4 years
Coming soon (this Wednesday!) to a Supreme Court near you, the case that could determine whether we still have the right to reimplement each others' APIs.
13
173
419
@joshbloch
Joshua Bloch
11 years
I wish I'd been on the ISS this morning http://t.co/4LZIWZaxRi
52
658
412
@joshbloch
Joshua Bloch
4 months
RIP Niklaus Wirth. If you programmed in the '80s, you almost certainly know Pascal (which is his language).
@Bertrand_Meyer
Bertrand Meyer
4 months
We lost a titan of programming languages, programming methodology, software engineering and hardware design. Niklaus Wirth passed away on the first of January. We mourn a pioneer, colleague, mentor and friend.
152
2K
5K
14
65
416
@joshbloch
Joshua Bloch
2 years
It is likely that I could have saved myself from all of this if I’d had regular colonoscopies starting when I was 50. If you’re 50 or over and haven’t had a colonoscopy yet, PLEASE do yourself and your loved ones a favor, and schedule one soon.
56
30
388
@joshbloch
Joshua Bloch
4 years
@g1l3sp 83 of us computer scientists and engineers, including 14 Turing Award winners, did our best to help them understand APIs and software ecosystems.
5
65
365
@joshbloch
Joshua Bloch
4 years
Bill Shannon passed away yesterday. He was a great engineer and a great guy. He was Sun Employee 11, known for his work on Unix and Java EE. He did not suffer fools gladly. R.I.P Bill, and condolences to his family.
18
51
365
@joshbloch
Joshua Bloch
6 years
Sadly, Oracle v. Google is back in play. For the record, we have ALWAYS reimplemented each others' APIs freely. If this ruling stands, it could do enormous harm to our profession.
24
339
358
@joshbloch
Joshua Bloch
1 year
Is it true that if Elon Musk accidentally breaks Twitter within 90 days, Amex Purchase Protection will reimburse his $44B?
10
20
355
@joshbloch
Joshua Bloch
8 years
For the record, we've ALWAYS been free to reimplement each others' APIs without the consent of their creators.
Tweet media one
10
349
335
@joshbloch
Joshua Bloch
6 years
I am happy to report that I now have a paper copy of my own book (Effective Java, Third Edition)🙂
20
33
336
@joshbloch
Joshua Bloch
2 years
I am alive and feeling remarkably well, all things considered. Thank you @AaronDawesMD and @StanfordHealth . These folks are consummate professionals.
22
4
334
@joshbloch
Joshua Bloch
6 years
By request, here are the slides for the Effective Java, Third Edition talk that I gave at NY JavaSIG
4
171
332
@joshbloch
Joshua Bloch
7 years
14
34
293
@joshbloch
Joshua Bloch
4 years
I am thrilled to announce that the Supreme Court has agreed to hear the case that addresses the crucial question of whether we still have the right to reimplement each others' APIs.
4
87
319
@joshbloch
Joshua Bloch
11 months
Effective Java is banned in Ohio prisons! I am not making this up. Thanks to @Cidmonster and the @MarshallProj for their fine investigative reporting.
20
106
318
@joshbloch
Joshua Bloch
8 months
A "friend" just sent this picture to me:
Tweet media one
23
25
310
@joshbloch
Joshua Bloch
7 years
As I keep saying, Trump has largely succeeded in his bid to make America hate again. This instance is particularly offensive.
12
189
271
@joshbloch
Joshua Bloch
2 years
Here's a picture of me working on the first Effective Java talk after the book was released at JavaOne (2001). I'm at my sister's house in Acton, MA, with brother Dan and son Tim. The talk was at Softpro Books in Burlington. My dad took the picture.
Tweet media one
9
8
289
@joshbloch
Joshua Bloch
5 years
When the garden gives you eggplants, make baigan bartha.
Tweet media one
Tweet media two
21
29
290
@joshbloch
Joshua Bloch
6 years
This one slipped right by me: Oracle will no longer allow any of its "Long Term Support" (LTS) JDKs to be used for free in production. I suspect that this will make them among the least popular JDKs of all time, and perhaps irrelevant. Am I missing something?
Tweet media one
34
292
288
@joshbloch
Joshua Bloch
6 years
This mouse pad is old. There are few if any like it. It is my daily driver.
Tweet media one
19
38
285
@joshbloch
Joshua Bloch
5 years
I'm happy to announce that I'll be returning to CMU this "spring" (January) to teach two courses with Charlie Garrod: "API Design and Implementation" and "Principles of Software System Construction"
7
33
283
@joshbloch
Joshua Bloch
7 years
@twignl @FoxNews @jerrykuch Good point! Sorry I forgot.
5
4
247
@joshbloch
Joshua Bloch
4 years
This is nonsense. For example, Doug Lea—who is in in no small measure responsible for Java's success—accepted one small grant from Google fourteen years ago, and promptly doled it out to deserving undergrads who were testing java.util.concurrent. Have you no shame, Oracle?
3
52
276
@joshbloch
Joshua Bloch
1 year
As you may know, elder son Tim now works for AMD. He suggested that we call his apartment the house of the Ryzen son.
10
4
271
@joshbloch
Joshua Bloch
4 years
Just to give equal time to Java, #WAT ?
Tweet media one
14
55
267
@joshbloch
Joshua Bloch
5 years
Proud to be one of 78 computer scientists encouraging the Supreme Court to preserve our right to implement each others' APIs
5
85
267
@joshbloch
Joshua Bloch
6 years
eBook is available NOW at @InformIT ! Hardcopy will ship 12/29. Happy reading🙂
Tweet media one
9
121
259
@joshbloch
Joshua Bloch
1 year
Under no circumstances will I pay Twitter for a blue check. Therefore, after April 1, you know with certainty that any tweet with a blue check that claims to be me is fraudulent. Going forward, the 𝙖𝙗𝙨𝙚𝙣𝙘𝙚 of a blue check may provide some assurance that a tweet is genuine.
11
23
255
@joshbloch
Joshua Bloch
1 year
This is your annual reminder that Integer.MAX_VALUE is prime.
4
25
249
@joshbloch
Joshua Bloch
6 years
William Chargin poked a wee hole in Java's type system. This program compiles cleanly but throws ClassCastException at runtime: class Main { public static <T extends String & Runnable> void main(T[] args) { args[0].run(); } }
9
118
248
@joshbloch
Joshua Bloch
6 years
This is your annual reminder that Double.MIN_VALUE is positive
10
80
249
@joshbloch
Joshua Bloch
8 years
A fascinating case study on Netflix's transition from blocking multithreaded to nonblocking async architecture
4
158
246
@joshbloch
Joshua Bloch
6 years
Sacha Baron Cohen still has it. Watch this (from "Who is America").
14
116
239
@joshbloch
Joshua Bloch
4 years
These cubes are neither moving nor expanding. I, for one, am flabberasted.
@jagarikin
じゃがりきん
4 years
欲張りセット
88
2K
9K
13
66
237
@joshbloch
Joshua Bloch
4 years
WAT?
Tweet media one
25
52
237
@joshbloch
Joshua Bloch
6 years
Effective Java, Third Ed. preorder from Informit at 40% off, with free US shipping (promo code PREORDER) 😊
Tweet media one
24
114
238
@joshbloch
Joshua Bloch
3 years
This is the best "neon spreading" style illusion I've ever seen.
@StuartHumphryes
BabelColour
3 years
This is fascinating & shows how weak colour information can be on a photo for the brain to fill in the gaps and "colourise" it for you. It's a black & white photo, but overlaid with a thin grid of coloured lines. They're enough to trick your mind into seeing a full colour image
Tweet media one
244
4K
16K
3
68
236
@joshbloch
Joshua Bloch
3 years
The circles are not moving, expanding, or contracting, but you knew that.
@jagarikin
じゃがりきん
3 years
矢印の方向に動いて見えますね~? 人間の脳は単純なので矢印で惑わされてしまうのでーす
265
10K
25K
7
45
231
@joshbloch
Joshua Bloch
5 years
Google has asked the Supreme Court to review the Federal Circuit's opinions that APIs are copyrightable, and that reimplementing APIs doesn't constitute fair use. The outcome of this case is critical to the future of our profession.
3
203
226
@joshbloch
Joshua Bloch
10 months
Hmm... Looks like Twitter is having difficulty hiring competent programmers.
@elonmusk
Elon Musk
10 months
To address extreme levels of data scraping & system manipulation, we’ve applied the following temporary limits: - Verified accounts are limited to reading 6000 posts/day - Unverified accounts to 600 posts/day - New unverified accounts to 300/day
192K
107K
447K
21
27
229
@joshbloch
Joshua Bloch
8 years
Retweet this until it breaks. Then retweet it again. We need this all over the Internet now.
Tweet media one
11
835
207
@joshbloch
Joshua Bloch
4 years
We depend on the right to reimplement each others' APIs, and we are truly afraid that your irresponsible lawsuit may deprive us of that right, which we've enjoyed throughout our long careers.
2
43
225
@joshbloch
Joshua Bloch
7 years
Stop what you're doing and read @sarahjeong 's article on Judge Alsup.
1
86
222
@joshbloch
Joshua Bloch
6 months
It looks like JavaScript is having a hard time finding a date. So apparently hyphen-separated dates denote UTC, slash-separated dates denote local time, and integers denote local time but with a zero-indexed month. Because of course they do. (HT Willow Chargin.)
Tweet media one
15
34
222
@joshbloch
Joshua Bloch
3 years
Yeah, JavaScript does this. Because of course it does.
@xufocoder
Сергей Ufocoδer 👽
3 years
Что не смеетесь-то? Не смешно? Не поняли, да? Это JavaScript!
Tweet media one
14
70
626
9
58
221
@joshbloch
Joshua Bloch
1 year
This is your annual reminder that Integer.MIN_VALUE == -Integer.MIN_VALUE
6
29
220
@joshbloch
Joshua Bloch
7 years
Here are just a few of the books written by the signatories of the "Freedom to Reimplement APIs" brief.
Tweet media one
4
107
212
@joshbloch
Joshua Bloch
1 year
R.I.P. Bob "crazybob" Lee. His killing was tragic, senseless, and incomprehensible (to me). He was only 43 years old, and so full of life. He was a dear, dear friend. My heart goes out to Krista and the kids.
11
27
217
@joshbloch
Joshua Bloch
6 years
"There are two ways of constructing a software design: One way is to make it so simple that there are obviously no deficiencies and the other way is to make it so complicated that there are no obvious deficiencies."—C.A.R. Hoare, 1980 Turing Award Lecture
1
86
212
@joshbloch
Joshua Bloch
4 years
We are not Google shills. We are scientists and engineers. Some of us laid the theoretical groundwork for the profession, some designed the computers you grew up on, and some wrote the software you use every day.
3
21
207
@joshbloch
Joshua Bloch
6 years
Just sent final manuscript off to AW for final proofreading. Total 90 items. #EffectiveJava3e
9
42
204
@joshbloch
Joshua Bloch
5 months
Line goes up.
Tweet media one
17
29
203
@joshbloch
Joshua Bloch
4 years
Cooked baigan bartha and masaledar sem with @cindybloch . Vegetables from the garden 🙂
Tweet media one
13
9
197
@joshbloch
Joshua Bloch
7 years
I tweeted this yesterday, but for some reason it flew under the radar☺ Consider this program: It compiles w/o error and throws ClassCastExc
Tweet media one
10
110
188
@joshbloch
Joshua Bloch
13 years
And the award for "Most Legally Encumbered Hello World Program" goes to Oracle for http://goo.gl/gpWFR
0
1K
184
@joshbloch
Joshua Bloch
9 months
I believe Twitter's rebranding necessitates some new nomenclature. I have a modest proposal. The verb "tweet" shall henceforth be replaced by "Xcrete." What were once "tweets" are now "Xcreta."
9
26
180
@joshbloch
Joshua Bloch
4 years
To understand the tremendous harm caused by state media, you must watch this brilliant edit of Fox News by the Washington Post video team.
6
85
177
@joshbloch
Joshua Bloch
6 years
As promised, here is a link to my "A Brief History of the API" talk from @DevoxxFR 2018
2
85
173
@joshbloch
Joshua Bloch
3 years
Looks like we have another option for OpenJDK builds.
@JavaAtMicrosoft
Java at Microsoft
3 years
Say hello to Microsoft Build of #OpenJDK ! New Long-Term Support distribution of @OpenJDK for your @Java workloads, in the #Cloud and everywhere else! Visit to learn more. ☕️☁️🐧🍏🪟
50
643
2K
5
24
166
@joshbloch
Joshua Bloch
6 years
This is your annual reminder that Integer.MIN_VALUE == -Integer.MIN_VALUE == Math.abs(Integer.MIN_VALUE)
4
57
164
@joshbloch
Joshua Bloch
3 years
At last.
Tweet media one
11
15
159
@joshbloch
Joshua Bloch
4 years
Kodachrome is magic. This slide of my father, me, and my brother Dan, was taken in 1962. It lay in a cardboard box for ~58 years, and I scanned it this week. I did not restore it in any way.
Tweet media one
8
5
160
@joshbloch
Joshua Bloch
4 years
It goes without saying that this sort of speech is extraordinarily dangerous.
@DrDenaGrayson
Dena Grayson, MD, PhD
4 years
‼️ @BrianKarem : Do you commit to making sure there is a peaceful transfer of power? @realDonaldTrump : We're going to have to see what happens....Get rid of the ballots, there won’t be a transfer, they’ll be a continuation. Words of a wannabe dictator.🤬
1K
5K
11K
10
61
147
@joshbloch
Joshua Bloch
3 years
I am proud to be one of 54 computer scientists reminding the court that we've always had the freedom to reimplement each other's interfaces, and that the profession and the public thrive under this regime.
2
20
158
@joshbloch
Joshua Bloch
4 years
First couple days harvest from our apricot tree.
Tweet media one
9
0
157
@joshbloch
Joshua Bloch
3 years
I don't usually say this sort of thing, but that was a stunningly good victory speech by Joe Biden. Kudos to all of those involved in putting it together.
0
4
156
@joshbloch
Joshua Bloch
1 year
A year ago today I was operated on for 5½ hours to remove a colorectal tumor. The operation was a success, and so far there’s no sign of a recurrence (thanks, @AaronDawesMD and @StanfordHealth !), but I'm not out of the woods yet.
9
3
156
@joshbloch
Joshua Bloch
7 years
@ryangrim Let us send a clear message to Darrell Issa
0
51
130
@joshbloch
Joshua Bloch
2 years
Not to brag, but this was my first day home from the hospital (and no, I won't be boring you with this sort of thing every day).
Tweet media one
5
0
152
@joshbloch
Joshua Bloch
2 years
@vzverovich This reminds me of jokes from a bygone era wherein southern states banned integrated circuits and mixed drinks.
2
4
151
@joshbloch
Joshua Bloch
7 years
@JaneMayerNYer @buzz I would love to see this, preferably including his grades. I would cheerfully trade my transcript for his.
4
13
135
@joshbloch
Joshua Bloch
5 years
Twuzzler: What does this program print? Now run it, and explain: class Puzzle { public static void main(String[] args) { System.out.println(Boolean.getBoolean("true")); } }
35
46
146
@joshbloch
Joshua Bloch
1 year
In his memory, you should get out your copy of 𝘛𝘩𝘦 𝘔𝘺𝘵𝘩𝘪𝘤𝘢𝘭 𝘔𝘢𝘯 𝘔𝘰𝘯𝘵𝘩 and reread it. It's as true today as the the day it was written (in 1975).
8
25
146
@joshbloch
Joshua Bloch
6 years
Special SUPER-SECRET sale on Effective Java, Third Edition at informit! Save 35% + free US shipping on book or eBook with coupon code BLOCH991 (case sensitive)
Tweet media one
9
61
145