Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • paul wheaton
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Liutauras Vilda
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Piet Souris
Bartenders:
  • salvin francis
  • Mikalai Zaikin
  • Himai Minh

CodeRanch Journal *** December 2020 edition

 
Marshal
Posts: 72615
317
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Report post to moderator
T h e  C o d e R a n c h  J o u r n a l - D E C E M B E R   2 0 2 0   E d i t i o n

All the CodeRanch staff have made you some coffee. It's in the jug next to the campfire. Come into the warmth, grab a mug and enjoy reading the December 2020 edition of the CodeRanch Journal.



W h a t ' s   N e w?

* The Ranch software has changed little in the last year (its birthday falls on 3rd January), but our names and faces do. One new face out in the back room: Somebody who has been programming as a hobby as long as he can remember, who acted as a tutor at College for his degree, and has been earning money for about two years, the very youthful looking Zachary Griggs.

* Winter has come, and we have had a little snow where I live. But the plants in my garden are still growing, and I recently found one which turns out to be poisonous. Oddly enough, I seem to have immunity to it, and can eat it quite happily. That discussion drew some interest from Paull W's other website, “Permies”. Anybody interested in farming, gardening, energy, the environment, sewing, etc., mosie over to Permies and see what they have to offer.

* One of the strange things about Winter is that the sunset is now ten minutes later than it was on 13th December where I live. But as I write this, I am suffering the shortest morning (latest sunrise) of the Winter. It is eight minutes later than on 13th December. I mentioned that a long time ago; if you can understand the link in Greg Charles' post, that explains the phenomenon.



I n t e r e s t i n g  C o d e R a n c h   F o r u m  P o s t s

We have had a lot of activity recently. We like it busy; that means there is something interesting for us to read and comment on.

* What's an Equalitator? It turns out it is a hypothetical object that can be used to provide a version of object equivalence different from the equals() method. The only equivalent I can remember just at the moment is that String method equalsIgnoreCase(). The point came up as a spin‑off from different discussions and you can find it here. Anybody got any ideas for a use case for an Equalitator? Would that be like the behaviour of a tree set if it is passed a Comparator not consistent with equals?

* The previous link was about what happens if you have multiple surrogates for the equals() method, leaving hashCode() unchanged. But what would happen if we change hashCode()? What if the “alphabet of variables” used to calculate the hash code is smaller than that used to test equivalence with equals(). Will that “break” hash‑based data structures? See this discussion. And what will happen if the “alphabet of variables” used to calculate the hash code is larger than that used to test equivalence with equals()?

* Can there be more to say about hash codes? Surely we all know about them because they are such a basic concept, and the Object class has a method to calculate them? We can say much more. This thread asks whether we should use an “initial value” when calculating hash codes. It turns out to be useful in cases where all the fields might be zero or null, like in a newly‑created array. That allows a hash‑based data structure to distinguish null being passed from a “real” object with all its fields null.

* The last time I edited the Journal, I wrote

I am disappointed to see that many old misconceptions are alive and kicking.

And now, I can say, “I am disappointed to see that many old misconceptions are alive and kicking.” The old chestnut, that i++ having a higher precedence than ++i means the postfix expression is executed first, reappeared here. Also so many people forget that the incremented value of i in i++ is hidden from view, and the value of the whole expression is the same as the old value of i.

* Cert exam questions often ask about basics, and it is surprising how many people that can catch out. Why do you get a different text when you use the += operator on a String? Why can you use its concat() method and get the same text back? This thread is short and sweet, but the question was answered.

To the OPs: thank you for your quality posts, you all will be rewarded with a well-deserved cow!



S o m e b o d y   y o u   m i g h t   n o t   h a v e   n o t i c e d

How many people notice Eric Matyas, who quietly adds a few sounds to his list of sounds and a few textures/images to his images. A useful resource for anybody writing games, I would have thought. He is there faithfully every week. Look at this three threads: 1 (music and sound effects) 2 (images) and 3 (his smallest thread, with 2D images).


B o o k  P r o m o t i o n s

CodeRanch tries to put on book promotions every week, but not during holiday periods, so there was only one promo in December. Try your luck to win the book; go to the appropriate forum and ask a question. Any posts, indeed, except “welcome” posts, are eligible for the draw.

Our most recent book promotion and its winners can be found below:

* Winners: Kanika Sud's Practical Hapi

We have at the moment three promotions planned for January: Azure Data Engineering by Vlad Riscutia, The Career Toolkit by Mark Herschberg, a CodeRanch sheriff, and High Performance Python for Data Analytics by Tiago Rodrigues Antao and provisionally Mastering Corda: Blockchain for Java Developers by Jamiel Sheikh. In case there are any changes, look at our Book Promotion Schedule

We are very grateful to the publishers and authors for supplying the books and answering our questions.

B o o k  R e v i e w s

* We have a dedicated forum for book reviews.

Please check out the latest reviews (also available on our Book Review Grid)



B o o k  S a l e s

* There are often special offers and discounts available from the publishers. One book I bought at a discount is by Jens Gustedt, Modern C (Manning, 2020). In what was a classic twenty‑five years ago, Object‑Oriented Software Construction, Bertrand Meyer described C as the right language at the right time. C was introduced about 1972, so it is nearly a half‑century old. Gustedt shows how C has been updated recently. He takes the reader through everything from pitfalls with #defines to running threads in C. It is by no means an easy book; I would recommend it for somebody who already has quite a lot of experience in C, and not at all intended for beginners.



T h e  M o o s e  o n  S o c i a l

You will find a few recent CodeRanch announcements and quotes at:

Twitter - https://twitter.com/coderanch
Facebook - https://www.facebook.com/coderanch

Follow / Like us so you don't miss a thing.



A b o u t  T h e  E d i t o r

Campbell Ritchie

I used to do pathology, but took early retirement in 2004. I had thought of getting a programming job, so I went to our local University and tried to sign up for a BSc in computer sciences, but within five minutes I was redirected to sign up for a conversion MSc, since I already had a degree.

It took me a few months to realise how useful it would be to be a member of a discussion forum, so I signed up for the Sun fora. I had only been there a few weeks before much controversy arose because their equivalent of the Ranch Office forum was to be restricted. Many people complained that meant they were restricting discussion about the website, and came over here, which was then called JavaRanch. I agreed with them. I followed, and stayed here. That was over fifteen years ago.


S u g g e s t i o n s / F e e d b a c k
If you have any feedback on this month's journal then feel free to create a topic in our Ranch Office forum.



J o u r n a l  A r c h i v e

Our previously published journals are available online at JavaRanch Journal


 
    Bookmark Topic Watch Topic
  • New Topic