13 votes

What programming/technical projects have you been working on?

This is a recurring post to discuss programming or other technical projects that we've been working on. Tell us about one of your recent projects, either at work or personal projects. What's interesting about it? Are you having trouble with anything?

7 comments

  1. [2]
    nothis
    Link
    Barely worth a post, but I tried actually using the Visual Basic part of Excel to do a custom macro. Horrible. Good god, Microsoft, why can't you make things easy?! Annoying popups, weird...

    Barely worth a post, but I tried actually using the Visual Basic part of Excel to do a custom macro. Horrible. Good god, Microsoft, why can't you make things easy?! Annoying popups, weird restrictions, blackboxed errors, unintuitive naming, crashes. I'm not even blaming VBA per se, just all the shit they built around it to actually use it in Excel. They even have a halfway decent editor in Visual Studio Code, now, can't they get some people to do the IDE part for them?

    I give Microsoft a chance to no longer suck about once a year, doing something that they should actually be interested in doing well (last "experiment" was using the Microsoft store, sure enough they managed to make that a disaster). They always disappoint. It would be funny if this wasn't a quasi-monopoly on office software. Just thinking of the literally billions of hours wasted each year on their bullshit makes me pull my hair out.

    (Before anyone brings it up: I used LibreOffice for years. It's worse.)

    6 votes
    1. TemulentTeatotaler
      Link Parent
      A lot of this comes from wanting backwards compatibility or appeasing an existing dev community that has VBA as a comfort zone. Things like treating 1900 as a leapyear for compatibility with...

      A lot of this comes from wanting backwards compatibility or appeasing an existing dev community that has VBA as a comfort zone.

      Things like treating 1900 as a leapyear for compatibility with Lotus:

      If this behavior were to be corrected, many problems would arise, including:

      • Almost all dates in current Microsoft Excel worksheets and other documents would be decreased by one day. Correcting this shift would take considerable time and effort, especially in formulas that use dates.
      • Some functions, such as the WEEKDAY function, would return different values; this might cause formulas in worksheets to work incorrectly.
      • Correcting this behavior would break serial date compatibility between Microsoft Excel and other programs that use dates.

      I'm not much of an Excel power-user, but you might have better luck with using interops/extensions. I never switched to Office 365, but I think that added scripting support for TypeScript/C# in a way that might be closer to what you were hoping for.

      I'm with you, though. VB makes my eyes bleed, and the Excel implementation makes that even worse.

      3 votes
  2. lonk
    (edited )
    Link
    It's been 8 months since I "launched" my personal project linklonk.com by announcing it on Tildes. I want to post about it on HackerNews next (planning for this Friday) to get a few more active...

    It's been 8 months since I "launched" my personal project linklonk.com by announcing it on Tildes. I want to post about it on HackerNews next (planning for this Friday) to get a few more active users. Since the amount of traffic the post will get is not predictable, I did some load testing to make sure it won't die. The load test showed that my api server can do about ~10 requests per second. This led to query optimization, code profiling and more caching which improved the performance to ~200 requests per second. I posted the details here.

    I'm now working on adding more caching to the Go server. Right now the popular items are calculated by running a query over ratings and grouping by item id. This is not optimal. It would be much more efficient to maintain a table of [item_id, num_votes] for each of the time periods that we are interested in (last 24 hours, last 7 days, last 30 days, all time).

    This table could be added to the database. But I'm adding it to the Go server as an in-memory structure. The nice thing about using Go is that the server is just one process so you can have state that is shared across all requests.

    I will post the numbers on how much this improves the rate of requests under a load test. I expect >1000 requests per second.

    Edit: with more caching and lazy initialization got it to 1000.

    ab -n 1000 -c 1000 <ip>:<port>/api/recommendations?timePeriod=week
    Document Path:          /api/recommendations?timePeriod=week
    Document Length:        15088 bytes
    
    Concurrency Level:      1000
    Time taken for tests:   0.959 seconds
    Complete requests:      1000
    Failed requests:        0
    Total transferred:      15176000 bytes
    HTML transferred:       15088000 bytes
    Requests per second:    1042.27 [#/sec] (mean)
    Time per request:       959.448 [ms] (mean)
    Time per request:       0.959 [ms] (mean, across all concurrent requests)
    Transfer rate:          15446.71 [Kbytes/sec] received
    
    Percentage of the requests served within a certain time (ms)
      50%    491
      66%    627
      75%    710
      80%    728
      90%    832
      95%    858
      98%    901
      99%    919
     100%    950 (longest request)
    
    3 votes
  3. Apos
    Link
    I've been diving into Vite to redo my websites. It's pretty cool to edit something and see the changes happen instantly. What I want to do is a basic code template that I can copy and quickly make...

    I've been diving into Vite to redo my websites. It's pretty cool to edit something and see the changes happen instantly. What I want to do is a basic code template that I can copy and quickly make new websites with everything I care about already setup.

    One of my requirement is that I want to build my site content directly in markdown. I also want the markdown to be hosted on GitHub and it should be viewable from there too.

    I made a static site generator a while ago which does the same thing: apos-docs, but that one is meant specifically for writing docs. Just write, don't configure anything, no distractions. If what I do with Vite works well, I can port apos-docs to it which should give me a better development experience.

    1 vote
  4. archevel
    Link
    I started helping Öppna Skolplatformen to integrate with my local municipality. It is basically an app for communicating between guardians and school (attendance, schedules, news etc). Today in my...

    I started helping Öppna Skolplatformen to integrate with my local municipality. It is basically an app for communicating between guardians and school (attendance, schedules, news etc). Today in my municipality this is done by accessing a webpage and logging in with your BankID (basically becoming a necessity for living in Sweden at this point). The page is... not great. Anyway, I just finished reverse engineering the HTTP calls necessary to perform the login so next steps will be to build the data scraping for fetching the necessary info.

    1 vote
  5. Qwerty-Space
    Link
    I've been working on a plugin for my chat group's bot that will record how many times each person says "nice" and add them to a leaderboard

    I've been working on a plugin for my chat group's bot that will record how many times each person says "nice" and add them to a leaderboard

    1 vote