• Activity
  • Votes
  • Comments
  • New
  • All activity
  • Showing only topics in ~comp with the tag "ask.advice". Back to normal view / Search all groups
    1. best way to go about with a script that seems to need both bash and python functionality

      Gonna try and put this into words. I am pretty familiar with bash and python. used both quite a bit and feel more or less comfortable with them. My issue is I often do a thing where if I want to...

      Gonna try and put this into words.

      I am pretty familiar with bash and python. used both quite a bit and feel more or less comfortable with them.

      My issue is I often do a thing where if I want to accomplish a task that is maybe a bit complex, I feel like I have to wind up making a script, let's call it hello_word.sh but then I also make a script called .hello_world.py

      and basically what I do is almost the first line of the bash script, I call the python script like ./hello_world.py $@ and take advtange of the argparse library in python to determine what the user wants to do amongst other tasks that are easier to do in python like for loops and etc.

      I try to do the meat of the logic in the python scripts before I write to an .env file from it and then in the bash script, I will do

      set -o allexport
      source "${DIR}"/"${ENV_FILE}"
      set +o allexport
      

      and then use the variable from that env file to do the rest of the logic in bash.

      why do I do anything in bash?

      cause I very much prefer being able to see a terminal command being executed in real-time and see what it does and be able to Ctrl+c if I see the command go awry.

      in python, you can run a command with subprocess or other similar system libraries but you can't get the output in real-time or terminate a command preemptively and I really hate that. you have to wait for the command to end to see what happened.

      But I feel like there is something obvious I am missing (like maybe bash has an argparse library I don't know about and there is some way to inject the concept of types into it) or if there is another language entirely that fits my needs?

      6 votes
    2. Thinking of getting into emacs, any advice?

      Recently I’ve been growing dissatisfied with my current workflow (Obsidian and iA) and looking to try something new, and someone recommended emacs, as long as I was up for the challenge. I figure...

      Recently I’ve been growing dissatisfied with my current workflow (Obsidian and iA) and looking to try something new, and someone recommended emacs, as long as I was up for the challenge. I figure it can’t hurt to try, and if I don’t implement it, well, I’ll have learned something.

      I’m fairly comfortable with CLIs, but will likely use a GUI, and will be using on a Mac.

      Anyone have advice for a total novice?

      17 votes
    3. Seeking advice on untangling the hornet's nest that is my business's website

      I'm in a decade-long predicament related to the management of a somewhat complex website for my publishing business, and I'd appreciate your advice. For context: I joined the company as an...

      I'm in a decade-long predicament related to the management of a somewhat complex website for my publishing business, and I'd appreciate your advice. For context:

      1. I joined the company as an original founder about 15 years ago. My initial roles mostly dealt with accounting, finance, sales, account management, etc. -- really, anything and everything I could help out with. I offered to take ownership of our website since I had a fair amount of web design and programming experience.
      2. The original version of our website was a patchwork of PHP scripts from back in the days before Composer. I was inexperienced and didn't know anything about frameworks, etc. so I just started adding code.
      3. Over the years, I built homebrew versions of user authentication, a backend (CMS, CRM, etc.), and our front-facing website (full-stack, from cloud hosting to CSS and everything in between). As the story goes, it became a spaghetti code mess that was only maintainable by me.
      4. Realizing that I'd created a mess, my next long-term project was to slowly start transitioning the entire backend over to the Symfony framework, including many/most of the homebuilt components such as auth. This probably took 5 years in earnest. This way, I could at least begin to have conversations about getting outside help.
      5. The other founder passed away unexpectedly, and I've found myself not having enough time to dedicate to the website. I can work on it here and there and patch it up when things break, but my fear is that we're going to become stale.
      6. I've had several conversations with individuals and web development companies in various capacities over the years. These conversations ranged from "sure, I can help out with front-end stuff" to "we would like to rebuild your website from scratch using (insert popular CMS) and then manage it for the low cost of (insert high cost)".

      Right now, all of the coding goes through me because it's the cheapest option (plus all of the context above). I'd like to explore delegating or outsourcing it again, but I don't know where the happy medium is as far as what needs to stay in-house.

      Just to give an idea of the complexity, as it goes well beyond what you would think a publisher needs, here are some of the features:

      • User auth/database with tens of thousands of users
      • Single sign-on that connects those users to several other platforms seamlessly
      • Content authoring
      • Several "microsite" type pages on the front end that require their own CSS/JS needs
      • Some unique features that were built because we couldn't find suitable alternatives, such as a webinar player that automatically generates certificates and stores them for the user, watermarked PDF downloads to include user information (i.e. to prevent piracy), etc.
      • CSS from the Bootstrap 3 era that has been modified and bolted onto over the years
      • Jquery stuff from way back in the day
      • and on, and on, and on

      To do things right, I would think that I need a server admin, a Symfony/PHP expert, and a front-end expert. But we're talking about what - hundreds of thousands of dollars per year? We can't afford that.

      In my mind, an ideal situation looks like this:

      • I am still able to see, modify, and keep control of our codebase (Git)
      • Hosting is managed. This is where my second biggest* fear lies, in that I know enough server admin to be dangerous, but I lose sleep knowing that an intrusion is inevitable and there are smarter people than me that can help prevent one.
      • I can assign out projects (e.g. we want to upgrade to PHP ## and Symfony ##, we want to redesign a page/template/etc., we want to implement SAML and connect it to another platform, etc.)

      *My biggest fear is that, since I hold the keys to everything related to this website, if I am unavailable (or get hit by a bus) then I leave the business in a REALLY bad place.

      Can anyone offer any advice on navigating this hornet's nest?

      11 votes
    4. PWA Notifications

      Building my first Progressive Web App, it's new territory for me but I've made it installable already. I'm trying to cover a fairly simple use case, which is displaying a badge count based on the...

      Building my first Progressive Web App, it's new territory for me but I've made it installable already.

      I'm trying to cover a fairly simple use case, which is displaying a badge count based on the number of unread notifications. Intuition tells me that I'd just ping an endpoint on the server at a 5 minute interval, but I'm in new territory so I thought I'd open up the conversation to see if there's any gotchas to be aware of.

      I'd like to see if there's anyone out there on Tildes who has experience in this domain - is the service-worker always on, or is it only active once the app has been open and then backgrounded? How do I know if the app is currently open? I would like the app to query for notifications more frequently when it's opened, and only intermittently when it's closed. Any tips?

      8 votes
    5. Framework 16: Additional hardware questions

      I'm looking to buy a Framework 16 in its most powerful Ryzen config. I'm looking at this being the last laptop I need to buy because of its modular design, so I don't mind the heavy initial...

      I'm looking to buy a Framework 16 in its most powerful Ryzen config. I'm looking at this being the last laptop I need to buy because of its modular design, so I don't mind the heavy initial investment.

      I'm looking to shave of $400-500 by buying parts externally, however. I wanted it to be 64GB RAM, with a 4TB OS drive to run Aurora on, and later on a second drive for another non-immutable LTS distro (probably Debian?).

      If I can source the same RAM/Storage, is there any reason to actually buy them from Framework? I'm a bit confused by the huge price difference, since I can get the same memory and storage hardware from Microcenter for about $400 less total.

      And if anybody has any experience with the Framework 16 as a daily driver, I'd be interested to hear any stories. I'm not getting the graphics module yet, but may down the road to see if it can replace my desktop fully. Drivers should not be an issue as Aurora has a Framework image that contains everything I'll need.

      10 votes
    6. Can I have some advice on the neural net I've been working on?

      Apologies if this isn't an appropriate place to post this. Inspired by a paper I found a while back (https://publications.lib.chalmers.se/records/fulltext/215545/local_215545.pdf), I tried my hand...

      Apologies if this isn't an appropriate place to post this.

      Inspired by a paper I found a while back (https://publications.lib.chalmers.se/records/fulltext/215545/local_215545.pdf), I tried my hand at implementing a program (in C#) to create ASCII art from an image. It works pretty well, but like they observed in the paper, it's pretty slow to compare every tile to 90-some glyphs. In the paper, they make a decision tree to replicate this process at a faster speed.

      Recently, I revisited this. I thought I'd try making a neural net, since I found the idea interesting. I've watched some videos on neural nets, and refreshed myself on my linear algebra, and I think I've gotten pretty close. That said, I feel like there's something I'm missing (especially given the fact that the loss isn't really decreasing). I think my problem is specifically during backpropagation.

      Here is a link to the TrainAsync method in GitHub: https://github.com/bendstein/ImageToASCII/blob/1c2e2260f5d4cfb45443fac8737566141f5eff6e/LibI2A/Converter/NNConverter.cs#L164C59-L164C69. The forward and backward propagation methods are below it.

      If anyone can give me any feedback or advice on what I might be missing, I'd really appreciate it.

      14 votes
    7. What are some great time savers on CLI that you would recommend?

      I use these right now on Debian: ncdu ncdu (NCurses Disk Usage): A disk usage analyzer with an ncurses interface, providing a fast and easy-to-use overview of disk space utilization. Ideal for...

      I use these right now on Debian:

      ncdu

      ncdu (NCurses Disk Usage): A disk usage analyzer with an ncurses interface, providing a fast and easy-to-use overview of disk space utilization. Ideal for identifying large directories and files in a user-friendly terminal interface.

      duf

      duf (Disk Usage/Free): A modern disk usage/free utility with a beautiful interface written in Go. It provides a quick and easy way to check disk usage across various file systems with color-coded output.

      tldr

      tldr (Too Long; Didn't Read): Simplified and community-driven man pages. Provides practical examples for commands, making it easier to understand and use without wading through lengthy and detailed man pages.

      nala

      nala (Next-Generation APT Frontend): A modern frontend for the APT package manager, designed to provide a more readable and user-friendly output for package management tasks.

      Speedtest-cli

      Speedtest-cli: A command-line interface for testing internet bandwidth using speedtest.net. Allows you to quickly check your upload and download speeds directly from the terminal.

      htop

      htop: An interactive process viewer for Unix systems. It provides a real-time, color-coded display of system processes, making it easier to monitor and manage system resources.

      powertop

      powertop: A tool for diagnosing issues with power consumption and power management on Linux systems. It provides detailed information on power usage by various system components and applications.

      thinkfan

      thinkfan: A simple fan control program for ThinkPads. It helps manage the system's fan speed to balance cooling and noise levels based on the temperature sensors.

      tlp

      tlp (Linux Advanced Power Management): A power management tool for Linux. It provides various configurations and options to optimize battery life on laptops without requiring manual tweaks.

      flatpak

      Flatpak: A system for building, distributing, and running sandboxed desktop applications on Linux. It provides a universal app distribution system that works across various Linux distributions.

      neofetch

      Neofetch: A command-line system information tool written in bash. It displays an aesthetically pleasing summary of system information alongside your terminal prompt.

      iftop

      iftop: A real-time console-based network bandwidth monitoring tool. It shows a list of network connections from/to your system and the bandwidth usage for each connection.

      nano

      nano: A simple, user-friendly text editor for the command line. Known for its straightforward and easy-to-use interface, making it a go-to for quick text editing tasks.

      Edit
      Oh wow! Thank you all for your suggestions!

      I was looking around and found cheat; it's defined as a cheat that allows you to create and view interactive cheatsheets on the command line. Hopefully, someone else might find it helpful as well.

      38 votes
    8. How bad are Nvidia GPUs for Linux really?

      I've been interested in switching to Linux, or at least dual booting, for some time now as Windows has kept getting worse and Proton for Steam has been getting better. I'm particularly interested...

      I've been interested in switching to Linux, or at least dual booting, for some time now as Windows has kept getting worse and Proton for Steam has been getting better. I'm particularly interested in trying Mint Cinnamon.

      In every Linux thread on here or Lemmy, I always hear people complaining about Nvidia drivers for Linux or other hardware problems that they avoid by having AMD.

      I have an Intel CPU and Nvidia GPU. How big of a problem is that, really? Does it make it an unbearable experience? Does it make it a lot more work to get things working? Does it make certain things impossible to get working? What's your experience?

      Also for dual booting, I hear people have problems with Windows messing up their Linux install. Is that a common problem, or a few people having bad luck? Is that avoidable?

      30 votes
    9. Advice for hosting (and building) a personal website

      Hey all! I've been thinking about buying a domain and building a personal website for myself -- at this point just a personal website with links to my socials, my CV, maybe any interesting...

      Hey all! I've been thinking about buying a domain and building a personal website for myself -- at this point just a personal website with links to my socials, my CV, maybe any interesting projects I want to publicize. Maybe someday I'll decide I want to add a blog or build a webapp or something, but for now it'll be something simple and static.

      My programming experience is very much not in the frontend side of things (I'm a data scientist and mostly use python day-to-day). I played around with HTML messing with my Tumblr theme enough back in the day that I'm reasonably sure I can build something solidly web 1.0, and I've toyed with stuff like Jekyll in the past. But I was wondering if I could use this as an opportunity to build up some basic skills that I could put on my resume for the future. But I have no idea what's out there that would be useful and quick to learn but wouldn't be massive overkill for a project like this.

      I also have no idea how web-hosting works and who to go with if I want to build a personal website myself rather than relying on something like Wix or Wordpress. Most of the easily-Google-able advice is for different use-cases. Advice is either people who want something user-friendly with minimal coding like Wordpress or it's for something properly big and commercial, neither of which is me.

      Anyway, I know we've got a lot of suitably tech-y people here on Tildes, so I'm hoping people here have good advice for this sort of use case. Thanks!

      21 votes
    10. Need help BCCing entire Outlook autofill contact list

      Today is my last day at work and my boss wants me to BCC anyone I have ever sent an email to announce my departure. I have tried exporting all my sent messages and trimming the list by advanced...

      Today is my last day at work and my boss wants me to BCC anyone I have ever sent an email to announce my departure.

      I have tried exporting all my sent messages and trimming the list by advanced sorting out the duplicate email addresses in excel, but messages with multiple recipients are plentiful and need to have the emails separated into individual cells at the very least.

      I also tried the .NK2 file route. I downloaded the MFCMAPI program to find my hidden autofill contact file, but it can only be exported as an .xml or .msg file and I don't know how to handle those files properly to get the data I need.

      Does anyone here have a solution to automatically add every autofill contact on Outlook as BCC recipients for a final email?

      EDIT: I found a solution that worked for both of us. I emailed the clients I remember as the most important and set up an automated reply to handle those I forgot to message.

      11 votes
    11. UI/UX Design for web dev

      Does anyone have any good resources, books or otherwise, in regards do good design for web dev? I'm a self taught full stack dev who just can't really make things look "pretty". They are...

      Does anyone have any good resources, books or otherwise, in regards do good design for web dev? I'm a self taught full stack dev who just can't really make things look "pretty". They are functional, but..that's about it. I know CSS, but maybe I just don't have an eye for it?

      Any suggestions would be great, thanks.

      19 votes
    12. Looking for some guidance for SEO for a small business

      Hi Tildes! My significant other works in a mom and pop veterinary practice (litteraly : one manages cattle care and the other manages pets (i. e. cats and dogs)) . They are going to retirement, so...

      Hi Tildes!

      My significant other works in a mom and pop veterinary practice (litteraly : one manages cattle care and the other manages pets (i. e. cats and dogs)) . They are going to retirement, so she's gonna take over along with a colleague (only for the pets part though). The practice is located in a mid-sized town (for Switzerland at least) ; it's big enough to support a couple more practices, not enough to feel that much competitive pressure (in fact all but one practice share the night and weekend on-call duties).

      I volunteered to build her a new website, since the name doesn't match the new structure they're creating (it basically goes from "John and Jane Smith Veterinary Practice" to "VetPun Ltd" ), and also because the old website has a dated early 2000s vibe.

      There no plan yet to integrate their practice management software to the website (it's also an ancien piece of tech, they are keen to replace it some day), so it's going to be a couple of static pages for now.

      This is technically well within my range (I'm a full stack dev, for such a small thing it's probably going to be a Github Page; although a small Digital Ocean droplet is not out of question), but I mainly work on B2B and have no idea how to do SEO.

      Here's what's in my checklist

      • Redirect the old website to the new one
      • Register in the Google Business directory
      • Register in the local business directory
      • Register in Google Maps
      • Modify the entry in Openstreet Map
      • Follow those guide for the website itself:
      • Ads: we plan some ads on local newspaper, and adwords for a limited time (and targeting people local to the area of course).
        • I guess I should also do Facebook? Does that overlap with Instagram? (I'm not a regular user of either of them, although I do have to use Facebook for some LARP event)
      • Analytics : say that I integrate Google Analytics, what kind of actionnable item can I expect out of it? Can I get the same kind of data using a self hosted solution? It has been years since I used it in my now defunct blog back in my teenage days, so I expect some change compared to 2008.

      Am I missing something?

      8 votes
    13. Advice on sharpening skills for career pivot

      After spending a couple years in management I want to get back into more individual contributor roles. It's where I can apply the skills I actually enjoy. Preferably I'd work as a dev or data...

      After spending a couple years in management I want to get back into more individual contributor roles. It's where I can apply the skills I actually enjoy. Preferably I'd work as a dev or data scientist, but what I want is to spend time solving technical/mathematical problems and less herding cats and politicking.

      EDIT: US with ability to relocate; willing to take a paycut.

      Background
      • About 9 years as lead dev in a start up (2004-2013). It was the golden era of 2005 when we started and I got the role strictly on skills I developed as a teenager. The start up failed shortly after I left but an associated passion project has lived on. In this role I built video streaming software client side, server side, web apps, and iOS apps. I used C#, javascript/node, mongodb, redis, SQL, PHP, objective-c, and C++ as well as functioning as sys admin and webmaster. Pretty much solo dev except for a contractor or intern occasionally.
      • Went back to school (homeschooled, no high school so I needed some pieces of paper), BS-MS-PHD, in mathematics (number theory) and published several papers. One of which launched a bit of a cottage industry for my collaborators. I haven't been involved post graduation but get updates when friends see me cited at conferences, etc. Wrote more domain specific stuff (Python, MAGMA, GAP).
      • During my last year of grad school I got very jaded towards the grind I saw before me that more that likely ended with a job at a teaching school making less than I wanted. Pretty much as soon as I made my intentions public covid happened so I was job searching during 2020 while finishing my doctorate.
      • Got my break early 2021, an entry level data analyst role for a major corpo. In this role I had a lot of time to just explore data, find patterns, test out some of the ideas friend in topological data analysis were thinking about, tested early ML models. Pretty much strictly Python and SQL. Went to manager in 2022 and then People Analytics Director in 2023.

      Current plans:

      • Attend more meet ups, there are a couple about an hour south of me. Hoping to build some connections with the local industry.
      • Private server and website stood up, plan to host projects etc here for interested parties.
      • Runs through exercism.io to refresh on some stuff.
      • Find some open source projects to contribute on? There is also a local group of indie game devs, perhaps offer my services where possible.

      So my question to you all is how would you go about sharpening skills and building up a portfolio?

      11 votes