The Joys Of Programming

merphle wrote:

Anyone else participating in the Advent of Code this year? I created a private leaderboard for GWJ folks - after you log into the site, click "Leaderboard", and then "Private Leaderboard", and plug in this code: 1063102-26827897

Crap. I was supposed to.
Oh well.

merphle wrote:

Anyone else participating in the Advent of Code this year? I created a private leaderboard for GWJ folks - after you log into the site, click "Leaderboard", and then "Private Leaderboard", and plug in this code: 1063102-26827897

Thanks! I've been doing it to learn Go- I did a bunch of last year's previously, then started this year fresh.

It's breaking my brain a little to context-switch between Go and Java (for work) because the variable declaration and function signature syntax is exactly the opposite.

merphle wrote:

Anyone else participating in the Advent of Code this year? I created a private leaderboard for GWJ folks - after you log into the site, click "Leaderboard", and then "Private Leaderboard", and plug in this code: 1063102-26827897

I'm in

YESSSSSSS. Now you all can guilt me into actually completing some of them.

Well, I got the first day done and then my new Alienware R10 arrived. So I'll be taking some time to get this set up.

Decided to solve all the puzzles using MySQL

I'm in! Frequently not getting to it when they release though haha

Moggy wrote:

Well, I got the first day done and then my new Alienware R10 arrived. So I'll be taking some time to get this set up.

Decided to solve all the puzzles using MySQL :-)

"I see you have elected the way of pain."

Using MySQL is genius because when you get the wrong answer, you can blame table corruption.

*Legion* wrote:

Using MySQL is genius because when you get the wrong answer, you can blame table corruption.

And you don't have whitespace syntax errors!

Some maniac wrote day 1b in Rockstar. Probably should have gone Christmas-themed, but I was thinking about submarines too much I guess.

The pressure is invincible The sea is deep Rock the sonar Listen to the sea Until the sea is mysterious Burn the sea Rock the sonar with the sea Listen to the sea Roll the sonar into the message Roll the sonar into the deep Roll the sonar into the abyss Roll the sonar into the reply Until the reply is mysterious If the reply is stronger than the message Build the pressure up Let the message be the deep Let the deep be the abyss Let the abyss be the reply Roll the sonar into the reply Shout the pressure

It's starting to kick my ass. Polished day 3 off yesterday and have made inroads to day 4 but things are starting to get complex. No way I'll get them all done before the end of the year.

Surpringly enough, I've kept on track! Ended up needing to do 6 days worth in 2 after taking a few days off, but I'm still going

Day 20 is haaaard

I am now reminded of the highs and lows of my career in programming.

The highs: Thinking of an elegant solution to day 6 part 2. Knocking off Days 6 and 7 in a couple of hours yesterday.

The lows: 2 insidious bugs that have brought my Day 4 part 1 and Day 8 part 2 solutions to a grinding halt.

Switched to Python and realized just how elegant my code could be but isn't

The lack of semicolons doesn't make it elegant.

Mixolyde wrote:

The lack of semicolons doesn't make it elegant. :wink:

hard disagree, where's the damn "don't like button"?

tboon wrote:
Mixolyde wrote:

The lack of semicolons doesn't make it elegant. :wink:

hard disagree, where's the damn "don't like button"?

:nod:

Mixolyde wrote:

The lack of semicolons doesn't make it elegant. :wink:

But what ever you do, don't miss a colon!

A Dart update that added null-safety by default broke most of my old AI bots on Codingame, and I am slowly working through my old entries and fixing them up to restore my ranking. I feel like one of those musicians that looks at their old stuff and hates it. Like what is all this mess? After I get it all working I will probably take another pass through some of the worst offenders and clean them up. Object creation inside simulation algorithms is really bad when you only have 200ms.

Another MacOs Q. I'm on a MacBook and developing in Java. For local development on my current project, work hosts a Ubuntu VM for me that has a Docker container with Cassandra in it. This is my first foray into NoSQL DBs.

I am able to connect to my Cassandra instance on the VM from my MacOs (local) terminal like this:
cqlsh -u cassandra -p cassandra
and describe the tables, etc.

I'd like some sort of GUI to manage this Cassandra instance. It would need to be free and run on MacOs and be able to connect to the Cassandra Docker image on that VM. What would you guys recommend? I'm not looking for SSMS functionality, just some basic functionality like browsing the records in a table, etc..

-BEP

bepnewt wrote:

I'd like some sort of GUI to manage this Cassandra instance. It would need to be free and run on MacOs and be able to connect to the Cassandra Docker image on that VM.

So you've got two problems to solve. First, exposing the Dockerized-within-a-VM Cassandra instance to your top-level OS, and then finding a piece of software which meets your requirements.

I know jack about Cassandra except that Tia Carrere was hot as her in Wayne's World. But I'm guessing that your Dockerized Cassandra instance is exposed to the VM through its default port, hence why your CLI command to connect to it doesn't seem to require any address or port info - it's probably defaulting to localhost:default-Cassandra-port.

Assuming that's right, you could go a couple ways:

- Forward that same port from the VM to the Mac OS, so that you can access the instance from MacOS on localhost:cassandra-port (or possibly vm-ip-address:cassandra-port), then connect to it from your GUI software of choice as if the instance was running in MacOS itself.

- Expose the VM's SSH to MacOS, then use SSH tunneling to connect to the Cassandra instance (DBeaver - the software Danjo just linked to - supports these SSH tunneling setups so that it can be a transparent one-click connection once set up)

IMAGE(https://media3.giphy.com/media/JDH83wGKCt6Uw/giphy.webp?cid=6c09b952ec9d59180a8e03f2a00bf779188deae5b7d51528&rid=giphy.webp&ct=g)

Danjo Olivaw wrote:

Maybe https://dbeaver.com/databases/cassan... ?

I thought of suggesting DBeaver - I use it myself a lot - but the fully functional version isn't free.

I’ve used DataStax Studio as a Cassandra UI in the past however they may have got rid of the free version so I’m not sure it’s an option for you

In theory you can use netstat while the toolisconected to figure out the default Cassandra port.

Appreciate the input, all. I was talking to my co-worker this morning and he said that IntelliJ would do it natively. It hooked right up with no problem.

-BEP.

If only this was actually a parody and not how things really are

I don't think I can click Play on that video.

It's after work hours, and I don't think I can handle it.

I laughed out loud at least three times. The jjQuery got me.