• Activity
  • Votes
  • Comments
  • New
  • All activity
  • Showing only topics in ~comp with the tag "ask.advice". Back to normal view / Search all groups
    1. Database schema for an upcoming comment hosting system

      I'm working on a small and simple comment hosting platform in PHP (SQLITE database) to host comments for my static blog https://prahladyeri.github.io/. No login, sign-ups or third party OAuth,...

      I'm working on a small and simple comment hosting platform in PHP (SQLITE database) to host comments for my static blog https://prahladyeri.github.io/. No login, sign-ups or third party OAuth, just plain old Wordpress.org style commenting system.

      I have come up with the following DB schema so far to store the comments (comments table) and enable the administrator's dashboard authentication (users table). Can this be improved further?

      -- init.sql
      
      drop table if exists comments;
      drop table if exists posts;
      drop table if exists users;
      
      create table comments (
      	id integer primary key,
      	reply_to_id integer references comments (id),
      	post_id integer references posts (id),
      	message text,
      	name text,
      	email text,
      	website text,
      	ip text, -- $_SERVER['REMOTE_ADDR']
      	notify text default 'n',
      	status text default 'Approved', -- Approved/Spam
      	created_at datetime default (datetime(CURRENT_TIMESTAMP, 'localtime')),
      	modified_at datetime default (datetime(CURRENT_TIMESTAMP, 'localtime'))
      );
      
      create table posts (
      	id integer primary key,
      	user_id integer references users (id),
      	uri text -- /blog/2024/05/some-slug.html
      );
      
      create table users (
      	id integer primary key,
      	username text not null,
      	password text not null,
      	email text, -- can be null
      	name text not null,
      	website text, -- comments will be posted to this site
      	role text not null, -- Admin/Staff
      	created_at datetime default (datetime(CURRENT_TIMESTAMP, 'localtime')),
      	modified_at datetime default (datetime(CURRENT_TIMESTAMP, 'localtime')),
      	unique (username),
      	unique (email)
      );
      
      -- create default data
      -- create a default admin user who handles to dashboard
      insert into users(username,password, name, role, website)
      values("admin", "admin108", 'Admin', 'Admin', 'https://example.com/');
      
      14 votes
    2. Honest Question: What benefits can I hope to achieve by switching from jquery to react?

      I'm a freelance coder who builds small-medium apps and my front-end stack primarily consists of Bootstrap+jquery. This combo has never let me down until now even with all kinds of features,...

      I'm a freelance coder who builds small-medium apps and my front-end stack primarily consists of Bootstrap+jquery. This combo has never let me down until now even with all kinds of features, functionality and complexity thrown at it. I've built dashboards with line charts, puzzles and MCQs, grids and tabular components to edit data, etc. and it was all very seamless.

      But when I keep hearing the discussions here and on other places in social media, they make me feel like I'm stuck in a very different century! There is no doubt that React is a well-known, popular and robust piece of software but one thing that dissuades me from getting into it is the whole monstrous npm system of components around it. It seems to be quite integrated with node when it comes to some react components like next, nuxt or whatever. Is it not possible to just like include react through CDN with link or script tags and still make good use of it?

      More specifically, I want to know what can I hope to achieve if I migrate from jquery to react? I'm quite tied to the jquery way of doing things right from DOM manipulation to event handling to things like cloning and reusing HTML components in <div> blocks. Is there any established guide or path for folks like us to migrate from jquery and react? And to begin with, is this a good idea even?

      22 votes
    3. 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
    4. 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
    5. Is PyGame still alive?

      So it was a long time ago in the good old Python 2.x days (circa 2010 probably) that I had learned PyGame with some tutorials at my former work place. But nowadays since I mostly freelance with...

      So it was a long time ago in the good old Python 2.x days (circa 2010 probably) that I had learned PyGame with some tutorials at my former work place. But nowadays since I mostly freelance with business apps, I never felt the need for it.

      But since such a game development project is on the horizon after all these years, I was wondering if PyGame can still be up for the task with Python 3.x? Or is there a better Python library available these days?

      I don't need any advanced gaming features of modern day VFX or anything, all I need is some basic Mario/Luigi style graphics, that's all!

      9 votes
    6. Opinions or experiences on Corsair build kits

      I am looking to replace my PC that I mostly use for gaming for close to 10 years. While I used to work in data centers, I've never been into building custom PC, particular the planning and...

      I am looking to replace my PC that I mostly use for gaming for close to 10 years. While I used to work in data centers, I've never been into building custom PC, particular the planning and research portion on what parts to get.

      I am currently eyeing the Corsair build kit, and wonder if anyone has any experience to share.

      Thanks in advance.

      6 votes
    7. Looking for help scraping and deleting a Reddit account

      I have a couple of old Reddit accounts I’d like to delete as fully as possible. However one of them dates back to my teenage years and it’s some of the only writings I have from that time. Any...

      I have a couple of old Reddit accounts I’d like to delete as fully as possible. However one of them dates back to my teenage years and it’s some of the only writings I have from that time. Any recommendations on good simple ways to scrape all the comments off of it and save them? Then what’s the best way to completely erase a Reddit footprint these days?

      Looking for as simple a solution as possible, I’m not tech illiterate by any means but it’s also not a real strong suit for me.

      18 votes
    8. What actually-useful questions should someone ask when hiring a cybersecurity professional?

      Imagine you’re the manager hiring someone for a technical cybersecurity job. What non-obvious questions help you judge the candidate’s skill/suitability? What makes those questions useful? That...

      Imagine you’re the manager hiring someone for a technical cybersecurity job. What non-obvious questions help you judge the candidate’s skill/suitability? What makes those questions useful?

      That is, assume you’ve done the standard complement of job interview questions such as background and tool familiarity. I’m looking for stuff specific to some part of cybersecurity. It’s okay to get specific to your part of the field.

      21 votes
    9. Need help planning a pseudo-upgrade for my computer tower

      Pseudo because upgrading some of the parts might have a knock-on effect for other parts. Might end up leading to an upgrade of the whole system, idk. So here's a list of parts that I've already...

      Pseudo because upgrading some of the parts might have a knock-on effect for other parts. Might end up leading to an upgrade of the whole system, idk. So here's a list of parts that I've already acquired. I was originally going to use some of them to fill out the Framework laptop that I pre-ordered... but I had an expensive couple of months earlier this year and figured I could wait on it. :(

      Part
      AMD Ryzen 7 7700x
      Crucial P5 Plus 2TB PCIe NVMe M.2 SSD
      (2) 16GB GSkill Flare X5 DDR5 6000 RAM
      $50 Microcenter gift card

      Now here's what I have in my tower currently.

      Part
      Rosewill Thor V2 ATX Full tower case
      Intel(R) Core(TM) i5-4670K CPU
      (2) 8GB GSkill DDR3 RAM
      Rosewill 650W 80 Plus Gold PSU
      MSI Z97-GD65 MOBO
      Gigabyte Nvidia 970x Windforce GPU
      1 SanDisk Ultra Plus SSD 250GB
      1 Seagate HDD 1TB

      I'm looking to keep the tower at the very least and reuse it for new components. Right now, I know that the mobo will absolutely need to be replaced IF I'm throwing the ryzen chip in. And with knock-on effect, probably the psu as well since these components are drawing more power. The goal is to get a solid 60 fps on Helldivers (which I can't do at the moment, even on the lowest graphical settings) since it's the most intensive game that I play. With this goal in mind, does it make sense to start using the components I have from the first list, or might it be cheaper to keep them for the framework and get older (still compatible) parts that would fit right in to the system as it stands?

      8 votes
    10. [help] Tips on resolving git conflicts, for the faint hearted

      I’ve been using git to keep revisions of my website. Since I work alone I only need three commands: git add -A git commit -m “<description>” git push Soon I’ll be adding a second person, and I...

      I’ve been using git to keep revisions of my website. Since I work alone I only need three commands:

      git add -A
      git commit -m “<description>”
      git push
      

      Soon I’ll be adding a second person, and I remember from experience that conflicts can happen even with two people. So I have two questions:

      • Is there a way we can avoid that happening outright?
      • Are the commands to resolve fairly standard or does it differ much on a case-by-case basis? I’m hoping to keep the number of commands as small as possible.
      10 votes