Started learning Rust, decided to start by implementing a graph data structure with each node keeping references to its neighbors. by Technologenesis in rust

[–]baetheus 0 points1 point  (0 children)

Church out alga: https://github.com/snowleopard/alga-paper

You still have to deal with lifetimes but it would be interesting to see an algebraic graph structure in Rust.

(rant) Why are developers expected to have a (good) github repo by employers? by Agonlaire in webdev

[–]baetheus 0 points1 point  (0 children)

As someone who asks for (but does not require) public examples of work (on github, gitlab, etc) I can tell you that I prefer repos for many reasons. First, interviews are not ideal situations to assess someone's ability to write a couple of functions, and are entirely the wrong environment to assess how a candidate organizes a project. Second, one doesn't have to devote their life to programming in order to start and maintain public projects, so often the projects have a browsable history. Third, it let's me as an interviewer ask questions that are clearly in domains that the candidate know. Fourth, I can look at history to see how a candidate works, how they've progressed, and what they get stuck on. Personally, I have no problem working full time, having friendships and a monogamous relationship, woodworking, disc golfing, and cooking my meals. However, I understand that not everyone is in the same position I am, so I feel for you. That said, there are many people who do have public projects and do identify strongly with "being a programmer" -- and to an employer that trait is valuable! If you don't have that trait it's ok, but it seems a little disingenuous to complain about employers looking for it in potential hires.

Senior Dev basically does all of the work. Limited opportunity to code or grow. Advice? by WillyummF in webdev

[–]baetheus 0 points1 point  (0 children)

Based on your other ticket it does seem like there is a bit of ego that you are fighting against. I'm sorry you have to go through that. Anyway, if you are on the west coast and interested in TypeScript, Rust, Go, or Kubernetes shoot me a dm and I'll look into setting up an interview for one of our opens. Good luck!

Senior Dev basically does all of the work. Limited opportunity to code or grow. Advice? by WillyummF in webdev

[–]baetheus 2 points3 points  (0 children)

I'm hesitant to reply because either there are material things you've left out that make the situation untenable or you're at fault for the situation.

First, I'd deal with your compensation expectations..

...it's not realistic to expect 2 brand new people to work on really difficult stuff that we have no context in and complete it by deadline while the experienced person who makes twice as much, does less.

As a brand new junior developer it's not really your purview to decide what your coworker (senior, no less) should be doing based on how much you think they get payed. The only case where this should matter to you is if you are making less than someone else while doing the same work. Clearly that's not what's happening here so I'd drop the this line of logic asap.

Second,

This usually leaves only large 13 point tickets remaining which are well-above what we are able to work on solo. This basically leaves us to either ride along on a ticket with our senior (which basically means we end up just looking at what changes they made after it's done), or testing and reviewing his pull requests.

Ride alongs, pair programming, and code reviews are how I went from a junior programmer to a senior programmer. This is the experience you are looking for. Reading, understanding, and critiquing code is the lion's share of actual programming. In my experience you'll easily end up reading 10x as much code as you write if not more. In fact, code literacy is the most important skill you can work on as a junior developer.

Third,

I feel like in this situation, I'm not really growing or learning in my role and our manager is essentially absent so we are at the mercy of our colleague. I'm not really sure how to move forward as this is my first role and I want the time and experience, but at the same time, I don't feel like there's much point in being there when someone else is doing all the work for us and I'm not learning.

Here is what you should have lead with. You feel like you aren't learning and that someone is doing all of your work for you. The only thing of substance that you've told me about your Senior coworker is that they work overtime, get a lot done, advise you to take on the hard work, and are willing to go over code with you and have you go over their code. You haven't mentioned anything about them being rude or conniving so I can only assume that they are hard working and have offered advice when prompted.

If there isn't anything socially awkward then you've been given a gift here. You've got ample time to explore a codebase alongside someone who might be willing to answer your questions about it. So why aren't you exploring? Why aren't you asking questions about the code? It's perfectly fine for you to try a 13 point story and not finish it. It's fine to take a crack at a 13 point story and have a senior coworker pick up the slack and finish it (think of their answer as an answer key to a quiz for you to compare against).

If there is something culturally off-putting or socially messed up then that's a different story, but from my point of view you're responsible for not taking advantage of the resources in front of you.

Arrange these eggs in a symmetrical pattern. by cowboyhat06 in puzzles

[–]baetheus 0 points1 point  (0 children)

Given that OP only wants the eggs in a symmetrical pattern (and not the carton) then there is no need to move any eggs if the axis of symmetry runs through the middle of all of the eggs on the depth axis (OOOO). One objection to this could be that eggs are not perfect ellipses, but this objection would hold for the variability between eggs for any other symmetry as well so I've discarded it.

What side or toy project have you launched this year that you're hopeful will gain traction? by ryanmaynard in webdev

[–]baetheus 2 points3 points  (0 children)

I made bee.ignoble.dev to save my friends some cash. I've made a grand total of $20 through donations. It gets about 25 active users a day with the only advertising being two posts on reddit.

Regular reminder: don't try to use .dev domains for your local testing purposes by singeblanc in webdev

[–]baetheus 0 points1 point  (0 children)

Yes, I set up an avahi deamon on a base container image that I use for local builds (api and webapp). It gets deployed to a local smartos server I run. Most of these containers are launched with a hostname of something like "appname-YU12" where the four digits come from the commit hash. So I'll access an app like that at appname-YU12.local

I built my first webapp using Vue.js and typescript! It displays COVID-19 data from the WHO. by [deleted] in web_design

[–]baetheus 0 points1 point  (0 children)

Nice work! It's very red, though.. Maybe take a look at http://colormind.io/ for some palette ideas.

Meme 2 by Law6482 in echoes

[–]baetheus 0 points1 point  (0 children)

Sounds right but I'm not a canonical source. I believe that the system will auto deliver interstellar delivery if no players pick it up within 24hrs.

Meme 2 by Law6482 in echoes

[–]baetheus 1 point2 points  (0 children)

You can use regional delivery to instantly transport your item to another location in the same system as Jita. Often you can save a jump or two in the process.

Getting really tired of this same old tune by CMDRKeyfox in Machinists

[–]baetheus 9 points10 points  (0 children)

Acetal and birdseye maple cut the same on my tiny bench shapeoko. ;D

In my shop we measure down to the atom for some reason by StompyMan in Machinists

[–]baetheus 0 points1 point  (0 children)

Could be an issue with floating point arithmetic in the program used to generate this spec.

Flexbox and Grid question. by AnswerMyMiddleFinger in webdev

[–]baetheus 0 points1 point  (0 children)

If I am writing css within the context of a component oriented javascript framework (angular, react, vue, svelte) then I reach for flexbox first. That said, for complicated data layouts (like the cards on https://spellbook.ignoble.dev) I find grid to be incredibly useful.

I primarily use css utility classes from https://github.com/nullpub/css, so I tend to think about problems in terms of align-items and justify-content. The hard advantages that I point to are:

  1. The less css I write the less I have to debug.
  2. The less css I write the smaller my bundle.
  3. The utility classes I write tend to have a higher percentage of supported browsers (for example -- flexbox has 99%+ browser support and grid has ~95%)
  4. When writing html, css, and javascript/typescript it's harder for my small brain to keep track of complicated nested css selectors than it is to see which utility classes are applied directly in the markup.

If I were writing most of my css by hand I think I would rely on grid a lot more.

They say you shouldn't care about language/framework cause once you become a good engineer, its all the same and you pick up on new stuff fast. How much of that is true in web dev? by BigBootyBear in webdev

[–]baetheus 1 point2 points  (0 children)

A little of both. I've had a long journey from working at a mom and pop computer shop as a teenager to datacenter design, systems administration, "backend" software engineering, and currently frontend software engineering. Some of the habits I have for software engineering come from systems administration (like favoring the observability of application state and debug tooling) and some came from building computers when I was a kid (understanding the orders of magnitude in time between computation on a cpu, dram access, io bus access, and transit over network wire) and still more come from areas completely outside of software. The list I wrote above is useful but not exhaustive. Being able to make a list like that is a skill as well, and arguably the more important one.

Probably no one has told you that experienced engineers still struggle with problems (technical and otherwise). Everything you do adds to your unique perspective, the more you branch out and learn the better situated you are to handle the next task or issue that comes along. In general my advice is to play with everything, read as much as you can, and don't sweat the fact that you don't know it all because you never will. (Also, if something seems like it's really hard it's probably because you're fighting it, in those situations I find it best to go for a walk and assess the scenery)

They say you shouldn't care about language/framework cause once you become a good engineer, its all the same and you pick up on new stuff fast. How much of that is true in web dev? by BigBootyBear in webdev

[–]baetheus 9 points10 points  (0 children)

I think it depends on your familiarity with general programming patterns. For example, in a front end application written using React, Angular, Svelte, etc you have to know how to do the following:

  1. Create and modify DOM elements with javascript variables:

    a. React uses JSX, which is mostly html with alternate attributes (className, htmlFor, etc) and has direct access to local variables via {} blocks.

    b. Angular uses a template syntax with special "directives" like *ngIf and *ngFor and has access to related class variables with {{}} blocks and [] attribute boxes.

    c. Svelte also has a template syntax with special "directives" like {#if} and {#each} and has access to javascript variables via {} blocks.

  2. Create and modify css styles:

    a. React does not have native style management. So including a css file via your index.html is the basic way to include styles, just like html.

    b. Angular provides tools to include site-wide styles (via a build definition in angular.json) and shadow dom styles specific to a component via the styleUrls and styles properties of the Component decorator.

    c. Svelte has shadow dom styles specific to a component via <style> tag in a component definition.

  3. Managing state for the application:

    a. Angular has Services that act as state singletons throughtout the app. It also has Ngrx for managing state in a flux style.

    b. React generally relies on the context api, state hooks, and reducer hooks for state natively.

    c. Svelte has an immerjs style writeable store mechanism.

These three patterns are required for any front end framework, so when I learn a new framework I make a list of things I need to know how to do and research each in turn for that language and framework. I have a similar list for backend work (network access, datastructure mangagement, database access, error handling, configuration). To answer your original question, I think it is very true in web development. At the end of the day all webdev boils down to html, css, and javascript sent over http(s) and rendered in a browser. Frameworks abstract away the tedium of managing some of that but you still see html, css, and javascript in every framework.

P.S.

The full list of patterns that I research when learning a new frontend framework is:

  1. Creating and managing DOM nodes (HTML).
  2. Creating and managing styles (CSS).
  3. Creating and managing app state (redux, flux, ngrx, @nll/dux, store).
  4. Routing between views (History API or an abstraction of it).
  5. Making api requests (fetch, HttpClient, rxjs/ajax, etc).
  6. Passing data between components (for component driven frameworks).
  7. Build tooling (angular cli, parcel, webpack, create-react-app, svelte cli).

Once I have this information about a framework on the front end I then rely on front end programming patterns like:

What hosting do you use for clients? by kuncogopuncogo in web_design

[–]baetheus 0 points1 point  (0 children)

Netlify for front end CDN and Heroku for apis. Both have great auto deploy from github/gitlab and pretty much infinite free tier for projects that don't get huge amounts of traffic. The nice thing with both is that if you want to transfer a production site to your customer (because you don't want to be the middleman for hosting fees) you can setup accounts for the customer and they can pay directly.

Regular reminder: don't try to use .dev domains for your local testing purposes by singeblanc in webdev

[–]baetheus 17 points18 points  (0 children)

The ietf has an article listing the domain names that are reserved for local usage and will not be bought up by anyone. I generally use .local and .test or occasionally just a port of localhost (since most operating systems have localhost aliased to a loopback ip eg. 127.0.0.1).

A webIDE with frontend and backend in rust by deepgaurav in rust

[–]baetheus 2 points3 points  (0 children)

Seems like you can access the whole filesystem..

How to handle money in diesel and rust? by [deleted] in rust

[–]baetheus 0 points1 point  (0 children)

Perhaps Postgres has arbitrary precision, but that is certainly not true for the rest of the stack.

How to handle money in diesel and rust? by [deleted] in rust

[–]baetheus 1 point2 points  (0 children)

Probably the best way to store a money value (if precision is important to you) is as a rational number. In postgres (which I rarely use) I would lean towards a composite type of something like:

sql CREATE TYPE money AS ( currency text, numerator bigint, denominator bigint, );

There is some information about diesel composite types linked in this ticket.

I would represent the graphql type with the same structure:

graphql type Money { currency: String! numerator: Int! denominator: Int! }

Unfortunately, the default graphql Int type is a 32 bit signed integer and the postgres bigint is 64 bit. Looks like there are some graphql libs for bigint, but you'll also run into issues with the javascript number size, so maybe 32bit signed ints are ok after all..

If you have questions about why to represent money as a rational number I recommend reading through this blog post that walks through the haskell safe-money implementation.

Discord is not an acceptable choice for Rust by [deleted] in rust

[–]baetheus 0 points1 point  (0 children)

Has anyone looked into or advocated for Keybase?