aksharvarma, to programming
@aksharvarma@mathstodon.xyz avatar

Evolution of how I think of while :

  1. When I first learned "loops":

while (condition is true) {do these things, adjust things so a slightly new condition is checked}

// That's where I first saw infinite loop and how there are intentional infinite loops.

  1. A small step to move condition update out of the loop body:

for (i=0; i< N; i++) {do these things}

// After the couple of days it took to get used to them, I found them neater and closer to how I think of things.

  1. Most of the time, the i from before is indexing into something, so let's directly deal with the item being indexed:

for item in collection:
do stuff

After the few days to rewire syntax muscle memory, going back would decidedly feel like a step back.

I don't want to give up automatic (and transparent) out-of-bound checks.

  1. There are actually only about 3/4 things one does inside a loop:

map/fold/scan/filter function-to-call collection-to-traverse-through

;; Getting rid of explicit indexing was just step one.
-- After a few days/months/years, I now realize that it is more important and less buggy if I think only of the function to call (and whether I want to end up with a new (maybe pruned) collection, a single thing, or "both" (that's how I think of scans))


Alternatively, my evolution as I learned new languages idioms:
-->
or -->
-->
or --> ???

Sharat_Chander, to Java
@Sharat_Chander@mastodon.social avatar

“Strong with , Baby Duke is.”

video/mp4

publicvoit, to programming
@publicvoit@graz.social avatar

What happens, when you join two paths in a language when the second one is an absolute one?

join("foo", "/bar")
returns "foo/bar" or "/bar"?

The wonderful @meisterluk wrote a great article about that you might want to read: https://lukas-prokop.at/articles/2024-05-03-filepath-join-behavior

I can not tell what version I'd actually prefer. There are situations where both versions would be "proper".

#C++

leanpub, to Software
@leanpub@mastodon.social avatar

Jetpack Compose internals https://leanpub.com/composeinternals by Jorge Castillo is the featured book on the Leanpub homepage! https://leanpub.com

openjdk, to Java
@openjdk@mastodon.social avatar

New candidate JEP: 472: Prepare to Restrict the Use of JNI: https://openjdk.org/jeps/472

openjdk, to Java
@openjdk@mastodon.social avatar

New candidate JEP: 471: Deprecate the Memory-Access Methods in sun.misc.Unsafe for Removal: https://openjdk.org/jeps/471

aeveltstra, (edited ) to Java
@aeveltstra@mastodon.social avatar

Reflection considered harmful

In the and OOP programming languages, is used to not only review an object’s private fields and methods, but also to access and change them.

This is used for instance by large libraries and frameworks, by preprocessors, and of course by the standard library itself.

It is dangerous because it can break a class’ definition of what should be private and inaccessible.

Every programmer should know.

Sharat_Chander, to Java
@Sharat_Chander@mastodon.social avatar

developers, Reminder that there's a SEAT WAITING FOR YOU at Oracle DevLive New York City (May 9). Come hear from Java experts including Georges Saab Chad Arimura Billy Korando & Aurelio Garcia-Ribeyro. Register now (it's FREE): https://www.oracle.com/developer/devlive/new-york/java/

image/png
image/png
image/png

ggus, to Java
@ggus@mastodon.social avatar

🧅 Project Seeks Network Health Engineer 🧑‍💻

The person in this position will work directly with helping us maintain existing systems, and design new systems for gathering and analyzing Tor network data.

The bulk of our code is currently written in , smaller portions are written in R, , PostgreSQL, and JavaScript. We are transitioning to a new pipeline mainly in and Python.

This is a full-time remote position.

https://www.torproject.org/about/jobs/network-health/

openjdk, to Java
@openjdk@mastodon.social avatar

Targeted to JDK 23: JEP 476: Module Import Declarations (Preview): https://openjdk.org/jeps/476

futurebird, (edited ) to random
@futurebird@sauropods.win avatar

Java has a interface* called “Set” but the documentation is nebulous & ominous. “may throw an exception” what? does no one even know? There isn’t even a method for intersection & union?! What is the point? I taught my students to use the set object in Python. It was an elegant beautiful experience— Thought we could do it in Java but I think I will just use arraylist, write my own damn methods.

I’m biased, but Java is always more annoying like this. ugh. (*this explains part of my confusion)

albertcardona,
@albertcardona@mathstodon.xyz avatar

@futurebird

In Java, "Set" is an interface. What you are looking for is a "HashSet" https://docs.oracle.com/javase/8/docs/api/java/util/HashSet.html or any other class that implements the interface "Set" like a TreeSet, LinkedHashSet, CopyOnWriteArraySet, EnumSet, and others, such as a Map's key set.

jitterted, to Java
@jitterted@sfba.social avatar

🚨 Alert 🚨

Working solo on some final Ensemble Timer features using and a bit of .

Join me now on Twitch at https://jitterted.stream

noneuclideandreamer, to genart
@noneuclideandreamer@mathstodon.xyz avatar

Alright, May Theme is Sound!

Doesn't sound or look so great yet, but the month is young! Here I try out different ... Scales?

Gotta find a "Music Theory for Dummies" or so in the School Library...

#creativecoding #sound #scrappyfiddles

video/mp4

kandid,
@kandid@chaos.social avatar

@noneuclideandreamer Hier habe ich angefangen zu beschreiben wie ich und kopple. Das "Jean live coding System" ist damit noch nicht erklärt. Aber die Links zeigen wie die Visualisierung Open Sound Control Telegramme sendet. Und wie die passenden Empfänger in SuperCollider aussehen. Weiter oben im Text ist auch meine Motivation notiert warum ich die audio-visuelle Kopplung gerade so gelöst habe.

https://gitlab.com/metagrowing/jean#using-super-collider-to-generate-sounds

https://gitlab.com/metagrowing/jean/-/blob/main/src/jean/OSCout/ScStreamSender.java?ref_type=heads

https://gitlab.com/metagrowing/jean/-/blob/main/src/jean/OSCout/ScSynthSender.java?ref_type=heads

leanpub, to Java
@leanpub@mastodon.social avatar

Stratospheric (Radiant Reader (eBook)) by Tom Hombergs, Björn Wilmsmann, and Philip Riecks is on sale on Leanpub! Its suggested price is $39.00; get it for $29.25 with this coupon: https://leanpub.com/sh/bYN3Kp94 #Java #AmazonWebServices #CloudComputing #Aws

openjdk, to Java
@openjdk@mastodon.social avatar

Targeted to JDK 23: JEP 474: ZGC: Generational Mode by Default: https://openjdk.org/jeps/474

Le_bottin_des_jeux_linux, to linuxgaming
@Le_bottin_des_jeux_linux@floss.social avatar
DiazCarrete, to Java
@DiazCarrete@hachyderm.io avatar

The history of the concept of "bean" in Java frameworks. It has undergone quite a bit of drift!

https://www.youtube.com/watch?v=Z5hxolai4Tk

#java

debugagent, to Java
@debugagent@mastodon.social avatar

🌟 Introduced by Sun Microsystems in 2004, has revolutionized dynamic system tracing. From Solaris to MacOS and Linux, it's a game-changer for real-time insights into OS and application behavior without hampering performance. https://debugagent.com/dtrace-revisited-advanced-debugging-techniques

array, to Java
@array@fosstodon.org avatar

I've got the impression that the doesn't get all the love it deserves, but I'm quite a fan myself. It's really impressive how featureful it is, and sure doing would be way harder if I couldn't count on it. My $newJob, I've been told, makes using Eclipse mandatory for Java dev, so this is great news for me. :)

ovid, to javascript
@ovid@fosstodon.org avatar

I started programming in 1982. Though I'm known as a #Perl developer, I tried to remember every other languages I've programmed in.

#BASIC, #C, 6809 Assembler, #Javascript, VBScript (and its many variants), #Java, #Prolog, #RakuLang, #Python, #Kotlin, #COBOL, Easytrieve, and probably a few others.

I wish I had gotten a job in Prolog, primarily because I loved what I could create with it. I don't love programming; I love creating.

What are you languages?

#programming #software #OpenSource

Sharat_Chander, to Java
@Sharat_Chander@mastodon.social avatar

#Java devs...

Reminder that you can meet Oracle's Java DevRel Team at this year's #DevoxxUK conference! Please join Nicolai Parlog, Ana Maria Mihalceanu and me (May 8-10)! We'd love to meet you!

Register now: https://www.devoxx.co.uk/

ghost_letters, to Java
@ghost_letters@fosstodon.org avatar

Shower thought:

Monoliths are having a comback. We need a new cool name for that architecture. It is okay to have some small microservices around the core. Something like a planet and its moons. Or if your system is big: a star and its planets...

Need a catchy term.

kerfuffle,
@kerfuffle@mastodon.online avatar

@ghost_letters The #modulith is up and coming. In the #Java ecosystem, you can look at #SpringModulith or Apache Karaf.

Pretty sure we can come up with more creative names based on the megalith if required. Maybe Dolmen Architecture? ( :

ahelwer, to Java
@ahelwer@discuss.systems avatar

You can't allocate an array in java of more than 4 GB in size? in 2024???? an INT SIZE ARGUMENT????

array, to Java
@array@fosstodon.org avatar

My project goes on, as a learning practice preparing for $newJob. I have, on purpose, excluded any frontend frameworks, just plain old HTML and CSS, and some JS strictly when needed. I build my templates with JSP, and I'm not using any backend framework. A bit more work? Maybe. But it's crystal clear, less bloated, and so fast! Plus, I get to see behind the abstractions, implementing models, services, factories, servlets, utils, etc. all by myself. In other words: I'm having fun. :)

  • All
  • Subscribed
  • Moderated
  • Favorites
  • tester
  • kavyap
  • PowerRangers
  • hgfsjryuu7
  • magazineikmin
  • thenastyranch
  • rosin
  • mdbf
  • Youngstown
  • slotface
  • InstantRegret
  • khanakhh
  • GTA5RPClips
  • DreamBathrooms
  • anitta
  • vwfavf
  • normalnudes
  • ngwrru68w68
  • everett
  • ethstaker
  • osvaldo12
  • cisconetworking
  • Durango
  • Leos
  • tacticalgear
  • cubers
  • modclub
  • provamag3
  • All magazines