Spyke

Posts

clojure·ClojurebyAlavi

calc and conversion

cross-posted from: https://lemmy.thewooskeys.com/post/1269207

FOSS calc and conversion

A friend of mine made a cool calculator and unit converter. It parses natural English phrases like "how many inches are in 3 feet?" and "300 miles / 65 mph in hours and minutes" and "download 10GB 1Gbps". You can access it from web (including PWA), CLI or as a library. It has a strong FOSS philosophy behind it.

calc and conversionhttps://github.com/EnigmaCurry/calcOpen linkView original on programming.dev
indieweb·IndieWebbyAlavi

Slashpage for favs list?

Hi. We have slashpages for /top4 which is cool, but I would like to have a page, hosting multiple lists of 4, 10 or maybe 20 items that I like to rank or list.

For example:

  • Movies
  • Books
  • Café and restaurants
  • games

I know I can just create this page for my own website but I just want to see if we have a common slashpage convention for that, or are we interested in adding it?

View original on programming.dev
blogging·BloggingbyAlavi

Blogging from mobile

Hi people.

I have a blog with zola ssg, so its using markdown, tracked by git.

I always write from my laptop but I thought writing from my android phone can be great too for quick notes and when Im traveling, away, etc.

I have termux+neovim setup on my phone but I though maybe theres something simpler for a phone. you guys have any suggestions?

View original on programming.dev
softwarearchitecture·Software ArchitecturebyAlavi

Help: Engineering an E-commerce store

cross-posted from: https://programming.dev/post/46281532

Hi fellow software engineers. Sorry for the long post in advance.

I'm offered a project for a website and E-commerce store for a medium-sized business.

There are thousands of E-commerce websites out there but I don't find it very straight forward to create one. I have mainly worked on enterprise software and don't have experience in E-commerce.

The website is going to be built with some SSG (probably Zola) az I really beleive in SSGs for websites. So we have that out of the way.

But for the E-commerce part, I'm confused.

Here are my requirements:

  • least development cost (time and money)
  • least maintenance cost
  • robust (don't need constant babysitting. Can work for years)
  • Simple both for developers and for admins
  • Better if we can find people to maintain it easily

Things that I'm good with:

  • JS/TS
  • Clojure
  • Python
  • HTMX
  • Vue / Nuxt
  • HTML/CSS

options that I'm considering:

  • Woocommerce

The layman's choice. I find wordpress horrible for websites but I think (not sure) that woocommerce has the least hassel and cost for an E-commerce website.

  • Django

Tried and tested. It has more cost of development but I think tge cost of maintenance is less. Creating with it's own MVVM architecture, it's basically server side rendering.

Also, python and django are very popular and it's very easy to find other people to work on the project.

It's similar to Django but for Clojure. Straight forward, scalable. I like Clojure MUCH more than python and am much more productive with it. The performance of this stack is also MUCH better than python and django and the technologies are more stable and need less maintenance.

The downside is, I probably cannot find anyone that knows Clojure.

  • Clojure + kit-clj + HTMX

This is a more "custom" approach, unlike frameworks like django, laravel, pedestal who take care of lots of things for you and do a lot of magic behind the scenes, we will be rolling everything ourselves here.

Render html server side with selmer and hiccup, and use HTMX for client side interactivity. Obeying HATEOAS and REST architectures.

I think this will be the most robust way but development cost will be higher and again, I will not find anybody else to work on it.

  • Server Client architecture

Server works with the database and handles business logic (Clojure/python/TS/JS) . can use graphQL to cut much cost and time from server side development, Client probably uses Nuxt.

Classic architecture, all young and old people are familiar with it, server and logic is decoupled from client.

Downside is the complexity of the front end stack rises. Horrible DX, horrible debugging, and costly.

Never used it, it is a full e-commerce framework, seems cool to be honest.


What do you guys suggest I should do? What's your experience? If there are better options that I'm missing out on, please tell.

View original on programming.dev
softwareengineering·Software EngineeringbyAlavi

Help: Engineering an E-commerce store

Hi fellow software engineers. Sorry for the long post in advance.

I'm offered a project for a website and E-commerce store for a medium-sized business.

There are thousands of E-commerce websites out there but I don't find it very straight forward to create one. I have mainly worked on enterprise software and don't have experience in E-commerce.

The website is going to be built with some SSG (probably Zola) az I really beleive in SSGs for websites. So we have that out of the way.

But for the E-commerce part, I'm confused.

Here are my requirements:

  • least development cost (time and money)
  • least maintenance cost
  • robust (don't need constant babysitting. Can work for years)
  • Simple both for developers and for admins
  • Better if we can find people to maintain it easily

Things that I'm good with:

  • JS/TS
  • Clojure
  • Python
  • HTMX
  • Vue / Nuxt
  • HTML/CSS

options that I'm considering:

  • Woocommerce

The layman's choice. I find wordpress horrible for websites but I think (not sure) that woocommerce has the least hassel and cost for an E-commerce website.

  • Django

Tried and tested. It has more cost of development but I think tge cost of maintenance is less. Creating with it's own MVVM architecture, it's basically server side rendering.

Also, python and django are very popular and it's very easy to find other people to work on the project.

It's similar to Django but for Clojure. Straight forward, scalable. I like Clojure MUCH more than python and am much more productive with it. The performance of this stack is also MUCH better than python and django and the technologies are more stable and need less maintenance.

The downside is, I probably cannot find anyone that knows Clojure.

  • Clojure + kit-clj + HTMX

This is a more "custom" approach, unlike frameworks like django, laravel, pedestal who take care of lots of things for you and do a lot of magic behind the scenes, we will be rolling everything ourselves here.

Render html server side with selmer and hiccup, and use HTMX for client side interactivity. Obeying HATEOAS and REST architectures.

I think this will be the most robust way but development cost will be higher and again, I will not find anybody else to work on it.

  • Server Client architecture

Server works with the database and handles business logic (Clojure/python/TS/JS) . can use graphQL to cut much cost and time from server side development, Client probably uses Nuxt.

Classic architecture, all young and old people are familiar with it, server and logic is decoupled from client.

Downside is the complexity of the front end stack rises. Horrible DX, horrible debugging, and costly.

Never used it, it is a full e-commerce framework, seems cool to be honest.


What do you guys suggest I should do? What's your experience? If there are better options that I'm missing out on, please tell.

View original on programming.dev
advent_of_code·Advent Of CodebyAlavi

why should we sort 2024-day1 ?

Hi guys.

I just did day1 of 2024 (I know, I'm late) this might be a dumb question but I reallydont understand why we should sort the two lists before substracting? I created some test cases with 10-20 items and calculated them manually, if you don't sort the list and just add all list1 items and substract from the sum of list2, you get the same answer. But it doesn't work with the large input file.

Let's say list1 has elements (a,b,c,d) and list2 has (e,f,g,h).

(a-e)+(b-f)+(c-g)+(d-h) = a-e+b-f+c-g+d-h = (a+b+c+d)-(e+f+g+h)

So the sorting shouldn't matter. Right? But it does. Am I too bad at basic math?

View original on programming.dev