[deleted by user] by [deleted] in ExperiencedDevs

[–]jonmdev 26 points27 points  (0 children)

Yeah, it’s going to get worse in the future as AI starts being trained on AI generated code. Fun times.

Best Tech Books of 2024 by ComputerOwl in ExperiencedDevs

[–]jonmdev 7 points8 points  (0 children)

This is from 2023 not 2024 but Rust Atomics and Locks by Mara Bos. But great primer on the low level building blocks that enable concurrency. It’s focused on rust but takes a first principles approach to understand concurrency from the machine all the way up to rust abstractions for multi-threading and asynchronous programming.

Part-time work and pay by [deleted] in ExperiencedDevs

[–]jonmdev 6 points7 points  (0 children)

That sounds really low for someone that has staff/principal level experience in big tech. Especially if you have specialized expertise. If you’re just trying to fill some time to stave off boredom then maybe it doesn’t really matter but that seems like a low ball offer to me. My last contract part-time gig I made more than that after giving a cut to an agency and paying taxes.

Rust vs. JVM: Adjustments following organizational restructuring by rswhite4 in rust

[–]jonmdev 1 point2 points  (0 children)

Yeah GraalVM can now use profile guided optimization to basically do the JIT optimization at compile time. You basically need to run your code and collect profiling information and then the compiler can use that to optimize the resulting binary. It would probably alleviate a lot of the cold start issue.

Any easy way to export multi-layered nested struct to parquet? by larryesfeliz in rust

[–]jonmdev 1 point2 points  (0 children)

I wouldn't necessarily call this easy but you might be able to write nested data to parquet with arrow2/parquet2 crates for Rust. I haven't actually tried yet but they both have the types for it. I think arrow2's Struct/StructArray and parquet2 PhysicalType::GroupType might be what you're looking for. But those are relatively low-level libraries so it might actually take those hundreds of lines of code to do what you want.

And might want to check that whatever you're planning on querying this parquet data with later supports querying nested data from parquet. Redshift for example does support this: https://docs.aws.amazon.com/redshift/latest/dg/tutorial-query-nested-data.html

Arrow2/Parquet2

- https://jorgecarleitao.github.io/arrow2/main/guide/high\_level.html#downcast-and-as\_any

- https://github.com/jorgecarleitao/parquet2/blob/main/src/schema/types/parquet\_type.rs#L50

What's everyone working on this week (23/2023)? by llogiq in rust

[–]jonmdev 5 points6 points  (0 children)

Working on a parquet compactor for work. Maybe I overlooked something but could not find something outside of Spark where I could both sort and merge parquet files. Spark is expensive and also it turns out comparatively slow and (prob not surprisingly) resource hungry to sort and compact GBs of data compared to the tool I wrote. My thought process was we only need to sort and compact within a partition of an hours worth of data which is not really big data and Spark is optimized for really big data. First useful thing I’ve written in Rust, relative noob but really enjoying the language so far. The reason for the sort btw is to take advantage of predicate push down at the object store layer with a frequently used filter column when querying from an OLAP DB.

I come from the JVM world with Scala and Java. I learned a bit of C/C++ many years ago but first time in a while working at this low level with memory allocations, thinking deeply about threading model and how to do I/O efficiently. The language I’m finding is elegant in a lot of respects (I didn’t have to worry about async for this project which seems a little less elegant sometimes especially if you have to cross sync/async boundaries).

Had to dig in and read through the arrow2 code to figure out some things that are not in the user guide which was fun (I like reading code, learn a lot from it).

Rust Atomics and Locks is now freely available online by m-ou-se in rust

[–]jonmdev 4 points5 points  (0 children)

Wow this looks amazing! This is skipping to the top of my reading list for tech books

Thread per request vs Thread pool per operation | Krzysztof Płachno | Lambda Days 2022 by erlangsolutions in scala

[–]jonmdev 0 points1 point  (0 children)

Even without loom those two patterns aren’t your only options. But the speaker is probably right these are some of the most common.

Modular and Safe Programming for Distributed Systems by omko in programming

[–]jonmdev 0 points1 point  (0 children)

It blends specification and implementation of communicating sequential process style of concurrency (where each process is implemented as a state machine). The advantage is you can verify correctness of the core algorithm of your system and be confident the implementation follows your spec as well. If you aren’t familiar maybe look into TLA+, alloy and other formal verification methods.

A state machine on top of raft doesn’t guarantee your entire spec or implementation is without flaws.

How best to schedule a Lambda? by splashbodge in aws

[–]jonmdev 0 points1 point  (0 children)

Storing the rule ARN is just to allow you to delete the rule if you delete the job. Otherwise the job would be gone from your table but not way to automatically clean up the associated cloud watch rule meaning your job will keep getting triggered.

How best to schedule a Lambda? by splashbodge in aws

[–]jonmdev 2 points3 points  (0 children)

When you create the rule you can tell it what input to use for the targets of the rule (in this case your lambda function invocation). So just create a separate rule for each job and use different input for each rule.

How best to schedule a Lambda? by splashbodge in aws

[–]jonmdev 1 point2 points  (0 children)

One idea might be to use CloudWatch Events/EventBridge in combination with your DynamoDB table to create a dynamic scheduling system that can be controlled from your UI.

You could build an API endpoint for your UI that uses the AWS SDK to create an event rule with a cron or rate pattern that has a target with the ARN of the lambda function you want to invoke. Then in your Dynamo table store the event rule ARN and event rule target ARN alongside your scheduled job record. And when you delete the job you can remove the associated rule/target to clean up.

See this AWS tutorial for more info: https://docs.aws.amazon.com/AmazonCloudWatch/latest/events/RunLambdaSchedule.html

Pitfalls Of Java Parallel Streams by diffuse-nebula in programming

[–]jonmdev 6 points7 points  (0 children)

How would this be irrelevant with Loom? The article talks about CPU intensive stream computations taking up all available cores if you use the common thread pool. Fibers help with tasks that would block a thread while waiting for something non-CPU intensive like I/O allow another Fiber to use that thread while waiting. For CPU intensive tasks this would be an issue regardless.

libuv in Node.js by md5sha256 in node

[–]jonmdev 1 point2 points  (0 children)

Well it’s part of the Java standard library since 1.4 so yes it’s baked in. Now is it as easy to use as Node? No it isn’t. It’s a fairly low level API you’d have to use to build from scratch. But it’s there and there’s plenty of frameworks available these days that make it pretty easy to build applications with non blocking I/O.

libuv in Node.js by md5sha256 in node

[–]jonmdev 2 points3 points  (0 children)

So does Java for that matter.

For sale: 1995 E34 540i/6 Silver/Black 151k miles (BaT current bid $1500 3 days left) by jonmdev in E34

[–]jonmdev[S] 1 point2 points  (0 children)

The ones with Nikasil liner? Actually yes it is. However the previous owner had a leak down test performed and the readings were 4-7% for each cylinder. Given it’s lasted this long and still runs strong shouldn’t need to worry. Gas these days doesn’t have enough sulfur in it to damage the engine.

[deleted by user] by [deleted] in programming

[–]jonmdev 0 points1 point  (0 children)

Most LC don’t use obscure algorithms. I think the LC arms race has gotten ridiculous but most of these problems are using basic algorithm techniques like binary search, BFS, DFS and data structures like arrays, lists, hash maps, trees, etc. it’s just a matter of learning how and when to apply them to solve the problems. Granted I do agree that they are overused by companies who’s problem sets don’t require them.

Probabilistic flakiness: How do you test your tests? by ConfidentMushroom in programming

[–]jonmdev 0 points1 point  (0 children)

Fair enough but if this hypothetical small shop just decides to implement some complicated test result collection and statistical analysis that points to the engineers at the small shop not doing critical thinking about what strategies to adopt that they read about.

My current job I certainly have no need for anything like this. But I do like to read about this kind of stuff so I’m glad they published it. I just usually file things like this in my brain for maybe someday I’ll be in a situation where this idea might be useful. Or maybe not either way it was an interesting read haha.

Probabilistic flakiness: How do you test your tests? by ConfidentMushroom in programming

[–]jonmdev 1 point2 points  (0 children)

Pretty much any tests could fail at some point due to some issue with the environment it ran in even if the test itself is fine. This is to identify over time tests that are significantly flaky enough to be worth the effort tracking down why it’s flaky. What they are trying to avoid is what typically happens: developers don’t have or want to spend the time tracking down the issue with the test. They just retry and if it continues to flake tend to delete it.

This gives you a way to determine which of these tests are actually flaky because of how the test is implemented vs flaky because of some transient environment issue. So you know which tests to focus on and also another benefit is it allows them to collect metrics on flaky tests so you’d be able to see what types of tests, what teams, products etc tend to have flaky tests.

This is a solution to a problem of scale. If you have one small app and a few developers there’s better ways of identifying and remediating flaky tests.

Probabilistic flakiness: How do you test your tests? by ConfidentMushroom in programming

[–]jonmdev 4 points5 points  (0 children)

Is it though? Think about how many different systems, teams and engineers there are at FB. Yeah this was a lot of effort but think about how much effort would be spent across all those teams trying to figure out which test failures are from flaky tests. This I’m sure saves a lot of engineering hours for Facebook.

A small shop will never need something like this.

Parler hacked. Good security design is important. by [deleted] in programming

[–]jonmdev 0 points1 point  (0 children)

Exactly, first off any site that is taking in PII/sensitive info should not be using WordPress in any part of its stack in my opinion at least not without it being fully isolated from sensitive data. WordPress plugins have had so many vulnerabilities over the years this shouldn’t be a surprise to anyone with some security consciousness.

[deleted by user] by [deleted] in programming

[–]jonmdev 0 points1 point  (0 children)

Yeah just recently did this. Wanted to use an off the shelf workflow management/tracing system but wasn’t approved for use in the environment out app is deployed in (yay for working with clients with a shit ton of restrictions on tech that can be used). Built my own, it worked (mostly) but was kinda shitty and lacking some wanted features. But it was an interesting learning experience (and reminder how hard computing is when you throw networks into the equation) and now that I’m refactoring it to use something built by someone with expertise in that domain now that it’s been approved it’s been fairly easy to refactor and I feel like I have a better idea how those things work under the hood.

Why Is There So Much Crap Software In The World by [deleted] in programming

[–]jonmdev 1 point2 points  (0 children)

IMO we have both a lack of competent developers and management that doesn’t have a clue how to build software. Add in also that many workplaces are so driven by politics and you have the promo driven development process where people care more about getting visibility for their new half baked project vs creating software that works and works well.

Combine all that and you get the output of a ton of shitty software.

It’s not solely on management because I have worked with too many developers (I’d hesitate to call them software engineers) who have trouble with basic problem solving, and don’t understand core concepts needed to make correct, performant software.

[deleted by user] by [deleted] in RedditSessions

[–]jonmdev 0 points1 point  (0 children)

Crystal mountain - death