Nice. Software developer, gamer, occasionally 3d printing, coffee lover.

  • 0 Posts
  • 32 Comments
Joined 1 year ago
cake
Cake day: July 1st, 2023

help-circle
  • You’re right. And my library aversion definitely made it harder. I think the day I learned the most was day 19, the towel one. Seemed simple at first but I just couldn’t wrap my mind around it, looked at a few solutions and one of the dynamic programming one solutions just blew my mind. Took me an hour or so to just wrap my head around it and then once I understood it I was able to write that abomination I posted from scratch (well, without needing to reference what I studied).



  • Javascript

    Spent 10 minutes debugging my solution until I reread and found out they wanted the number of keys that fit, not the ones that overlapped. Reading comprehension is not it tonight.

    const [locks, keys] = require('fs').readFileSync(0, 'utf-8').split(/\r?\n\r?\n/g).filter(v => v.length > 0).map(s => s.split(/\r?\n/g).filter(v => v.length > 0)).reduce((acc, s) => {
        const lock = s[0].split('').every(v => v === '#');
        const schema = s.slice(1, -1);
        let rotated = [];
        for (let i = 0; i < schema[0].length; i += 1) {
            for (let j = 0; j < schema.length; j += 1) {
                if (!rotated[i]) rotated[i] = [];
                rotated[i].push(schema[j][i]);
            }
        }
        if (!lock) {
            rotated = rotated.map(v => v.reverse());
        }
        const pinHeights = [];
        for (const row of rotated) {
            const height = row.indexOf('.');
            pinHeights.push(height !== -1 ? height : 5);
        }
        if (lock) {
            acc[0].push(pinHeights);
        } else {
            acc[1].push(pinHeights);
        }
        return acc;
    }, [[],[]]);
    
    let fits = 0;
    for (const lock of locks) {
        for (const key of keys) {
            let overlapped = false;
            for (let i = 0; i < lock.length; i += 1) {
                if ((lock[i] + key[i]) > 5) {
                    overlapped = true;
                }
            }
            if (!overlapped) {
                fits += 1;
            }
        }
    }
    
    console.log('Part One', fits);
    


  • This consternation is definitely common. It’s hard to apply skills to something with no long term impact of benefit. I’ve improved my skills by finding stuff I can help on in the communities I participate in.

    It’s natural to be overwhelmed, so deciding on a project does scope what you can learn, but a hard part is architecting the foundation of that project.

    Introducing new features to an existing project is a great way to get your feet wet - it has multiple benefits, for one of you do take a position as a developer in the future, you likely won’t be architecting anything initially, primarily improving on existing projects. So participating in OSS projects is a similar mechanism to that - you have to learn their codebase to a degree, you have to learn their style and requirements, etc.

    Even if you don’t ultimately contribute, it’s still a learning experience.




  • I really like the way my current company handles things. Aside from annual raises that take effect July 1st (currently waiting for approval, but if that happens after July 1st the raises are retroactive to the first), we have open bars (free drinks) every other month, company wide lunch events a few times a month, other general events (had a Juneteenth and Pride event this month). Oh, and all these events are paid time (you still have to hit your KPIs though).

    A fairly well stocked kitchen (you could make your own lunch if you wanted to), coffee and espresso machines, sparkling water / flavored water one as well, snacks, the whole deal. Yes it’s not perfect but I’ve been happy so far.








  • I figured, but wanted to clarify in case others saw it that way 😅.

    I assume the thing a degree usually covers that a self taught lacks is accepted best practices, teamwork, and alot of principles that are better learned before diving into it. So a lot of bad habits to unlearn.

    IMO, in today’s information world a degree isn’t necessary for learning, only as proof of learning (which is still very relevant). But a formal education also puts the tools you need to practice in front of you. Software development is an easy field to learn and prove your skills in. Chip design you’d definitely be better off getting a formal education, though you still see people making microcontrollers in games like Minecraft without formal education.





  • The Dockerfile is essentially the instructions for deploying from scratch. Sure, they most likely only exist for one distro but adapting isn’t a huge chore.

    You can also clone the repo and build the container yourself. If you want to update say, log4j, and then attempt to build it, that’s still entirely possible and easier than from scratch considering the build environment is consistent.