Skip to main content


Personal growth is hard when you leave no room (time) for it.

in reply to Neil E. Hodges

Not pictured: competitors, cybercriminals, and foreign intelligence agencies, represented by the Ratte, a giant robot, and Doctor Manhattan, respectively.
This entry was edited (4 months ago)



Over a decade ago ago, I wrote an #NCurses vertical shooter from scratch in C++, but ran out of steam because I couldn't come up with a good AI system for the enemies. Maybe I could try again, but use #Lua or something similar to make AI writing easier. #programming #GameDev




Do you have to pronounce the name of the #programming language #Lisp like "Lithp"? 🤔


PEP 703 – Making the Global Interpreter Lock Optional in CPython


CPython’s global interpreter lock (“GIL”) prevents multiple threads from executing Python code at the same time. The GIL is an obstacle to using multi-core CPUs from Python efficiently. This PEP proposes adding a build configuration (--disable-gil) to CPython to let it run Python code without the global interpreter lock and with the necessary changes needed to make the interpreter thread-safe.


#python #programming #gil

Andrew Sterian reshared this.



Neil E. Hodges reshared this.


I think I found a #Python #bug today. If you try to do a csv.writer.writerow() and one of the strings (not bytes) in the row contains a null character in it, and you are using a csv.Dialect with escapechar set to None, it will result in this condition evaluating to true when it shouldn't. That will almost immediately result in the need to escape, but no escapechar set exception being thrown. #programming

reshared this



AI code generation provides us with vast swaths of legacy code that was copied from sources with all sorts of licenses that may not be compatible with each other or the end result. #programming
in reply to Neil E. Hodges

Yeahhhh, or one might argue that AI generated code is a new work and thus ready to be given a new free-standing copyright using whatever terms the "prompter" feels like.

Of course current so-called "AI"s are all trained by reading lots of code, so it may also be possible to argue that nothing they produce can really be claimed to be truly "clean room" creations, even though technically the way they work pretty much can't copy any actual code (or anything else) from their training materials.


Neil E. Hodges reshared this.


If AI-based code generators are indiscriminately sampling real-world programmers of all skill levels, then I don't think we really have to worry about them replacing more skilled programmers. #programming


When you come from the era of PHP and CGI Perl, and not the era of Node. #programming

I miss the simplicity of the early Web.
This entry was edited (1 year ago)

Neil E. Hodges reshared this.


Learned a new #Python trick on the job:
@contextmanager
def func(…):
    resource = …
    try:
        yield resource
    finally:
        …

#programming

reshared this





Don't hire a full-stack developer to work on a queue. #programming #joke



in reply to Neil E. Hodges

Nah--there will always be room for more. My fav 3 right now are JS, Python, and Rust. :) Right tool for the job!
in reply to Neil E. Hodges

Hopefully not, but certainly the vast amount of software that most users recognize as software will be JS for some time to come (driven by C++ or Rust under the hood of course).

in reply to Neil E. Hodges

I don't have a clue, but at least it's gone now (along with other out-dated versions of scripting languages).

The release notes for 10.15 (when it was first deprecated) do say:
Scripting language runtimes such as Python, Ruby, and Perl are included in macOS for compatibility with legacy software. Future versions of macOS won’t include scripting language runtimes by default
The same appears in the Xcode 11 release notes.

They don't say what specific "legacy software" they refer to though.


I'd still like to write a #Fediverse server in #Java, but I don't have the time or energy to do so solo. #programming

reshared this

in reply to Neil E. Hodges

I would participate ( 10y+ java backend exp). Contact me!
in reply to Bob

Cool! Are you aware of any good JSON → Java code generators? Manually writing the AP DTOs is more boilerplate than I have patience for.
in reply to Neil E. Hodges

well if then it would be openapi to Java which is straight forward; however I discovered there is already at least 1 ActivityPub-compatible Java implementations out there (https://fediverse.party/en/miscellaneous/)
This entry was edited (1 year ago)
in reply to Bob

I noticed Smithereens a while back, too. Could be a good starting point for a fork. Definitely would want to port it over to Postgres, though.
in reply to Neil E. Hodges

yes, totally. I'm going to check it out and boot it up to see how far it is yet
in reply to Bob

not the programming style I would do in 2022 however it seems a good starting point really
in reply to Bob

not. It's not. I'd rather start from scratch with micronaut or quarkus. This codebase is nothing we want to maintain
in reply to Bob

Thanks for looking into it. I've never worked with either of those frameworks, but they do sound promising.

Any ideas on a JSON → Java code generator for the AP object boilerplate?
in reply to Neil E. Hodges

there are so many out there we can just try some
in reply to Bob

because it's so obvious for the java implementation of the fediverse I suggest the name jediverse
in reply to Bob

See https://github.com/jediverse/coruscant which I just created. The models are there. No page is served yet, must be a config issue. http://localhost:8080/swagger-ui/ works

Neil E. Hodges reshared this.

in reply to Bob

Thank you for kicking this off. I can add the JSON DTOs, but I won't be able to get to it until the weekend.
in reply to Neil E. Hodges

I think it's already all set, see the model package
in reply to Bob

You might need something like this to handle polymorphism via the type field documented here. My code is under the BSD license, so it can be used elsewhere. Perhaps it would be a good idea to have a separate library since the other ones I've seen are very outdated.

I can handle the polymorphism, but I still won't have time until the weekend.
This entry was edited (1 year ago)
in reply to Neil E. Hodges

@Christine Lemmer-Webber I saw your name on a number of things related to ActivityPub test suites. Do you know if one still exists?
in reply to Neil E. Hodges

I'd help if it were Go! 🙃

But I would probably want to design a new protocol from scratch first.



Had to implement an #OAuth callback handler because a service I wanted to use outright refused to work with OOB OAuth. #programming


No Google, I don't want a #Java library from 2008. #programming


Upgraded my JDK version from 11 to 17 because I wanted some features added in 12. #Java #programming


When you've learned that many of the Stack Overflow solutions from years ago are outdated and are now using deprecated/removed functionality or are considered bad style today, but search engines keep digging them up because they were once popular. #programming
in reply to Neil E. Hodges

Finding a solution online doesn't mean you can turn off your brain. Common sense is still required to assess the results and find the best one. 10 year old answers might not be the most appropriate anymore. I often find myself searching multiple sites for an answer that I like.
in reply to Neil E. Hodges

Recently, I also noticed that often the solution to a problem simply emerges when writing the question into StackOverflow. There, you normally don't post your entire source code (if you're not a beginner at least), and while producing a minimal working example, and thus reducing my problem to the very core, I sometimes find the solution on my own. If it's not a too specific problem, I'd then just publish the question and answer it on my own, just for future reference.


When you're using Apache HttpClient 5 but all of the tutorials are using HttpClient 4. #Java #programming


I enjoy both regular expressions and SQL.

I'm a dying breed, I guess. #programming #regex #sql
in reply to Neil E. Hodges

Me two! This is an old article, but this is how I use RegEx from within SQL. Specific to MS SQL Server though: https://www.red-gate.com/simple-talk/databases/sql-server/t-sql-programming-sql-server/clr-assembly-regex-functions-for-sql-server-by-example/
Unknown parent

Neil E. Hodges
That's optional, at least with Postgres.


#Java takes forever to write, but the structure it enforces does make maintenance easier. #programming


Did my first baby # experiment today. Feel like I learned some useful info. #


I haven't been uploading a couple of big trips' worth of #photos because I've been working on a new tag editor. With it, I won't need to mess around with #Flickr's uploading UI as much. (Photo)

I wrote it in #Java since it's what I've been writing the most because of work. As much as people love to hate on it, there are a number of things I like about Java 8+. #photography #programming #photog

in reply to Neil E. Hodges

While writing this, I discovered a bug in SWT’s ImageLoader where the resulting image was always incorrect. For example, a 1×1 white JPEG loaded correctly via SWT’s ImageData was turned into a yellow 1×1 JPEG when saved again via ImageLoader. I had to use AWT’s BufferedImage and ImageIO to save files correctly.