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?

16 comments

  1. [4]
    joplin
    Link
    I'm making progress on my software synthesizer. I've been focusing on emulating analog circuitry, and the results have been a lot of fun. I've implemented oscillators for basic analog waveforms...

    I'm making progress on my software synthesizer. I've been focusing on emulating analog circuitry, and the results have been a lot of fun. I've implemented oscillators for basic analog waveforms like sine wave, sawtooth, triangle, and square/pulse wave. I've added a low-frequency oscillator to give me some vibrato, and connected it to the mod wheel. It has an envelope generator and a digitally-controlled amplifier. I just added a lowpass/highpass/bandpass filter to it so I can make some really neat sounds, though I think something's still missing from the filter. I'm using it in Logic Pro. The next thing is to make the modulation of one part of the synth easier to hook up with modulation sources. After that, I'm going to be looking into FM synthesis and vector (wavetable) synthesis. I will probably do some stuff with additive synthesis that I mentioned previously, but that's probably a few weeks off.

    7 votes
    1. [3]
      3_3_2_LA
      Link Parent
      That's very interesting! How are you going about the implementation? Are you using a framework like JUCE?

      That's very interesting! How are you going about the implementation? Are you using a framework like JUCE?

      3 votes
      1. [2]
        joplin
        Link Parent
        I'm writing it in C++ from scratch. I'm following along with the book Designing Software Synthesizer Plug-Ins in C++ (That link is for the about-to-be-released update. I got the older version...

        I'm writing it in C++ from scratch. I'm following along with the book Designing Software Synthesizer Plug-Ins in C++ (That link is for the about-to-be-released update. I got the older version about a month ago, as it seemed like the new version was never going to come out.) The book is in a unique in-between place in terms of giving you the actual circuit diagrams of the pieces (at least for the analog pieces), and helping you understand the basics of the math behind emulating it without going too far into either the math or the electronics and being overwhelming. (At least to me.) I found it refreshing!

        3 votes
        1. 3_3_2_LA
          Link Parent
          Thank you so much, that does sound like a fair balance between a lot of handholding and an exercise in frustration. Added to my ever burgeoning to-read bookshelf :)

          Thank you so much, that does sound like a fair balance between a lot of handholding and an exercise in frustration. Added to my ever burgeoning to-read bookshelf :)

          1 vote
  2. [4]
    elcuello
    Link
    Total n00b here. I'm picking up coding again after never really having touched it for 10 years (and back then I was a beginner too) - it's hard. I'm learning Angular and while the code itself is...

    Total n00b here.

    I'm picking up coding again after never really having touched it for 10 years (and back then I was a beginner too) - it's hard. I'm learning Angular and while the code itself is somewhat understandable (although overwhelming) it's all the services and programs that goes along with it I just can't get my head around and it's pissing me off. I'm the kind of person that needs to understand how it fits together before I can learn the specifics. I'm using VS Code. I have no idea how to explain it without sounding like an idiot but I'm talking about SourceTree, VS TFS, Jenkins, GovCloud, Git, NodeJS, TypeScript etc. As you can see it's all over the place. I really need some way to explain it to me in layman terms what these specific programs do and how they are possibly connected. Does this place exist or do I have to read up on every one separately and just figure it out? I know the gist of it but are really missing the big picture. It's really a part of programming that's left out in most tutorials. I know there's many ways to do it and that's probably why and maybe it's because I'm old and people in this field are just used to different setups.

    5 votes
    1. PetitPrince
      Link Parent
      There's no shame in not knowing things. In fact a common lament for web developer some years ago is that they had to learn whole new framework every 3-4 years. I am not aware of any index of terms...

      There's no shame in not knowing things. In fact a common lament for web developer some years ago is that they had to learn whole new framework every 3-4 years.

      I am not aware of any index of terms "for dummies", but what I found useful is to ask what problem each of those term solves and in what context. In that regards, with the list you provided (minus GovCloud because I have no idea what it is other than some AWS service at first sight):

      • Sourcetree: a git client. Problem it solves: git is a command line app that can be made more approachable with a colourful interfaces and some big buttons
      • Git: a version control system. Problem it solves: this app make file versionning more manageable than "meAwesomeApp_v32_FINAL_bugfix3_for_release.js".
        NodeJS
      • Node.js: it's the Javascript interpreter from Chrome taken out of the browser. Problem it solves: there's ton of people that are experienced in Javascript, but it's shackled to a browser. With Node.js you can write program that doesn't involves a browser at all.
      • Typescript (TS): it's a superset of Javascript (JS) i.e. it's a different way to write Javscript. Problem it solves: JS is a dynamic programming language, meaning if you writevar pizza; the variable pizza can contain a number, a word, a programmtic object,... anything really. This is great if you need to quickly write something, less so if you want to write robust program. Thus TS adds "types" to JS so that if you write var horse: number; the variable horse has to be a number
      • Jenkins: an automation server. Problem it solves: updating your software is seldom only pressing the save buton in your editor. For each new version you may want perform some automatic test, generate some graphics, upload the new software to some servers, etc... Jenkins does all of that and present the results on a nice web page.
      7 votes
    2. stu2b50
      Link Parent
      Some of it is unnecessary for a solo developer doing tutorial projects (Jenkins, for example, which handles CI), and some of it is just a result of the area you chose to start in. Writing modern...

      Some of it is unnecessary for a solo developer doing tutorial projects (Jenkins, for example, which handles CI), and some of it is just a result of the area you chose to start in. Writing modern web apps is really quite a complex problem when you look at it from above, at the whole stack.

      The web was originally designed to be a protocol to send and display documents - it only through much massaging and hammering you can now make arbitrary interactive applications on it. It's like we took Microsoft Word and bolted on things until it turned into a small operating system.

      So you need Babel, to transpile your code to a single minimized es6 compatible file - you need webpack, to handle all the transpilers - you need libraries like React and Angular which maintain shadow DOMs because the actual DOM is too slow - you need TypeScript and Flow and all that because JS is a mess and typing makes it much nicer to use.

      4 votes
    3. krg
      Link Parent
      I'm with you. The actual coding aspect ain't so bad... but, boy, is there a whole lotta cruft you need to familiarize yourself with that ties things together in all these "modern" setups. Of...

      I'm with you. The actual coding aspect ain't so bad... but, boy, is there a whole lotta cruft you need to familiarize yourself with that ties things together in all these "modern" setups. Of course, you don't need to know DevOps and what-have-you if all you're trying to do is write a Python script that prints out the nth Fibonacci number, but once you start moving beyond that and trying to utilize web frameworks... woof... so much added weight. And many tutorials just kinda fly through that stuff assuming some familiarity on the user's part already.

      Anyhow, you might wanna start simple and check out the MDN learning paths for plain HTML, CSS, and Javascript.

      2 votes
  3. Gyrfalcon
    Link
    I don't know that it super fits in ~comp but I have been studying for the Ham radio license exam. Radio and electrical engineering type stuff is something that I don't have much formal training...

    I don't know that it super fits in ~comp but I have been studying for the Ham radio license exam. Radio and electrical engineering type stuff is something that I don't have much formal training in, but I am excited to learn more and get to play with radios!

    4 votes
  4. [5]
    lonk
    Link
    I made my hobby project https://linklonk.com publicly accessible and creating an account no longer needs an invitation code. The account creation happens when you try to do an action that results...

    I made my hobby project https://linklonk.com publicly accessible and creating an account no longer needs an invitation code. The account creation happens when you try to do an action that results in a non-GET request to the server (POST/PUT/DELETE) to which the server response with an authentication error. On the client side, an HttpInterceptor (I use Angular) handles this error by showing you a dialog to confirm if you want to create an account. It's a bit hacky, but it seems to work.

    Initially I was worried that once the site becomes publicly accessible then web-crawling bots would start pressing upvote/downvote buttons and registering accounts, but it didn't happen in the last two days. I wonder if bots avoid making non-GET requests.

    I'm also adding contextual tips to help new users understand how the site works. It's nothing technical but I think it is more important than any technical improvements I can make at this point. I would appreciate any advice/suggestion regarding the onboarding process.

    3 votes
    1. [4]
      skybrian
      Link Parent
      Well-behaved bots will avoid making non-GET requests, but you definitely shouldn't rely on that. I expect the spammers haven't noticed your site yet. Since I must have already created an account...

      Well-behaved bots will avoid making non-GET requests, but you definitely shouldn't rely on that. I expect the spammers haven't noticed your site yet.

      Since I must have already created an account before, I get a page with no content other than a form saying "Mark read & load new". I'm not sure what that does?

      1 vote
      1. [3]
        lonk
        (edited )
        Link Parent
        Just to confirm, you see no recommendations above the blue "Mark read & load new" button? LinkLonk saves the state of the recommendations to local storage and restores it on your next visit. Maybe...

        Just to confirm, you see no recommendations above the blue "Mark read & load new" button? LinkLonk saves the state of the recommendations to local storage and restores it on your next visit. Maybe your state was an empty list and now it restores that list?

        I just pushed an update that would ignore previously saved state if the list of saved recommendations is empty. That would force the client to load fresh recommendations. Could you please try refreshing the page and see if it fixed the issue? If it doesn't, please try pressing "Mark read & load new".

        As for spammers, yes, the site is too small to be interesting to them.

        Edit: made a change to forget the locally saved state of the recommendations if it is older than 7 days. I hope it will prevent people from getting stuck in a bad state. After all, the saved state was not meant to be long-term.

        1. [2]
          skybrian
          Link Parent
          Okay, I'm seeing recommendations now and it says "last updated: 80 days ago". One odd thing I noticed is that most links don't have dates, other than "What changes would you like to see in...

          Okay, I'm seeing recommendations now and it says "last updated: 80 days ago".

          One odd thing I noticed is that most links don't have dates, other than "What changes would you like to see in LinkLong" which was 82 days ago.

          Account status is a bit confusing. I tried upvoting something and it says I don't have an account, but if I click on "Profile" then it says I am "Signed in as a Temporary Anonymous account." It looks like I can send invites and there is a "Delete your account" button, all of which seem like the sort of things you could only do if you have an account.

          (Also, the Welcome message invites you to "Upvote 👍 something," something, which doesn't actually work until you create an account.)

          1. lonk
            Link Parent
            Thank you for the report! The account status was indeed inconsistently handled in the case when the user had created a temporary account that has since expired. On the client side the Firebase...

            Thank you for the report! The account status was indeed inconsistently handled in the case when the user had created a temporary account that has since expired. On the client side the Firebase Authentication library thinks that the user is signed in because the auth cookie is still there, but on the server side I deleted the account from the DB and from Firebase API.

            I now changed the logic on the client to make the state consistent. The client makes a request to the server and if the server response looks as if the user is not signed in (ie, not recognized by the server as an active account), then I will sign out the user on the client side.

            I also made the UI a bit more sensible for the signed out state - now there are no Profile/Your ratings/Create a post links in the nav that make sense only for signed in users.

            The dialog to sign in/create account is now more functional - you can sign in with email or "Continue as guest" (ie., the temporary account). I very much hope that I didn't break anything along the way.

            2 votes
  5. skybrian
    Link
    Recently I've been getting into audio programming again, using JavaScript and WebAudio since I'm already somewhat familiar with those. I use Observable for this and it's quite fun. (Though,...

    Recently I've been getting into audio programming again, using JavaScript and WebAudio since I'm already somewhat familiar with those. I use Observable for this and it's quite fun. (Though, Observable itself adds more complexity over bare JavaScript with its reactive-style programming.)

    I've written two notebooks so far that I'm pretty happy with: Audio Worklet Example and Microphone Audio Spectrogram. The second one is a rewrite of someone else's notebook that I found hard to understand. (It turned out that it was because it contained quite a bit of unnecessary code.)

    I posted my audio worklet example to Observable's forum under "Show and Tell" and got some good feedback on how to simplify it. It seems that if you write example code that's intended to be read, sometimes people do read it.

    Also, I started up the 3D printer (after not using it for more than a year) to play with printing flexible materials. I hope to make a large air-filled button using a pressure sensor as a demo for getting back into my accordion synthesizer project. Flex materials are a bit annoying to print with since they tend to be stringy, but I printed a simple bellows shape and it seems promising.

    If you don't have a 3D printer, here is a video about making a bellows out of a cardboard template and gaffer tape. I tried it and it seems like a nice method. On the less practical side, I found this video about making a fancy accordion bellows by hand to be quite long but fascinating.

    3 votes
  6. lionirdeadman
    Link
    I've started working on fp-build which is a shell script that has a few flatpak commands with tons of flags to build things how I want it and mimick how flathub builds things. It also does some...

    I've started working on fp-build which is a shell script that has a few flatpak commands with tons of flags to build things how I want it and mimick how flathub builds things. It also does some checks to see if the program has a proper icon, .desktop file and appstream data.

    I'd like for it be able to find the manifest without me telling it where it is by looking in the directory I'm currently in, the correct manifest should have a certain format (tld.domain.App) and only has certain extensions (.json, .yaml, .yml) so that should be possible.

    I think I want to add a flag to check the flatpak manifest with flatpak-external-data-checker and more checks in the future which are not mandatory in flathub.

    I've been working on it because I've been working for the past two weeks or three on updating old flatpaks which are using old runtimes, application or libraries. It makes it much easier.

    2 votes