• Activity
  • Votes
  • Comments
  • New
  • All activity
    1. Do signed or annotated git tags have any special advantage over lightweight tags?

      I'd been using the normal git tag -m <something> command over the years to create tags and releases for even my open source side projects. But today I learned that such tags (unsigned or...

      I'd been using the normal git tag -m <something> command over the years to create tags and releases for even my open source side projects. But today I learned that such tags (unsigned or non-annotated) are supposed to be used only for private or temporary use. And we are supposed to run the following instead so that the tags get both annotated and signed:

      git tag -m "v1.0" -a "v1.0"
      

      The -a tag can be used to add useful notes to the commit apparently. But apart from that, do you see any special advantages, especially when pushing code to Github? Is Github going to treat annotated code/releases/tags somewhat differently in any situation? I'm asking from a more pragmatic or utilitarian perspective.

      9 votes
    2. 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
    3. 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
    4. 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
    5. 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...

      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?

      5 votes
    6. 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
    7. 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...

      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?

      17 votes
    8. What’s your method for archiving bookmarked/liked social media posts?

      Following the recent upsets with both Twitter and Reddit, how have people here been exporting/archiving their bookmarked/favorited/liked/etc threads, posts, and the content within (images, links,...

      Following the recent upsets with both Twitter and Reddit, how have people here been exporting/archiving their bookmarked/favorited/liked/etc threads, posts, and the content within (images, links, etc) for later reference?

      It hit me not too long ago that there’s a lot of good stuff I’ve bookmarked over the years on both and it’d be unfortunate for viewing it to be locked behind keeping accounts active. Additionally, more and more of it’s disappearing over time not just due to link rot (which seems to have been accelerating dramatically in the past decade), but also as a result of users deleting their posts on the way out.

      I’m particularly interested in solutions that saves content locally, because exporting these things to e.g. a cloud read it later service or bookmark manager really just shifts the problem around instead of solving it, but beggars can’t be choosers and all that.

      17 votes
    9. Why do the arrow functions won't return "this" object in a jquery event handler?

      Consider the following simple jquery event handler code I've been using since ages: $("body").on("click", ".dome .btn", function() { console.log(".dome .btn onclick::"); console.log($(this)); });...

      Consider the following simple jquery event handler code I've been using since ages:

      $("body").on("click", ".dome .btn", function() {
      	console.log(".dome .btn onclick::");
      	console.log($(this));
      });
      

      The this object here returns the button element in question which is the proper way. But today, I decided to use arrow function just to upgrade myself with the modern times:

      $("body").on("click", ".dome .btn", () => {
      	console.log(".dome .btn onclick::");
      	console.log($(this));
      });
      

      But in this case, the this object won't return the button element. It will return the window object instead which is the parent of all parents! What kind of atrocious quirk is this? Few days ago, someone on the /r/webdev subreddit told me that arrow function is just a modern way of writing the old function(){} syntax.

      10 votes
    10. 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...

      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?

      9 votes
    11. Is Emacs or VIM worth learning in today's day and age?

      I'm a full stack webdev and gotten through almost everything in life without using these legendary editors. For Linux work, I mostly use the nano CLI editor which does the job fine and while on...

      I'm a full stack webdev and gotten through almost everything in life without using these legendary editors. For Linux work, I mostly use the nano CLI editor which does the job fine and while on desktop, there are superior ones like gedit and geany. On Windows, my preferred code editor is Notepad++ though I've experienced Eclipse, Visual Studio and Android Studio in various situations. Guess there isn't any substitute to AS when it comes to Android APK development?

      But these two legendary editors (Emacs/VIM) come highly recommended and a programmer is considered incomplete in the long beard circles until they learn one of them, isn't it? But I want to understand what can I hope to gain by learning them in terms of utility or usefulness? Can I somehow bring efficiency to my workflow by reducing my development time or adding a feature?

      30 votes
    12. How do you organize your Linux packages?

      Hello everyone. I am planning to get back into Linux development after working with Mac only for almost a decade. On Mac, one of the most important lessons that I learned was to always use...

      Hello everyone.

      I am planning to get back into Linux development after working with Mac only for almost a decade. On Mac, one of the most important lessons that I learned was to always use Homebrew. Using various package managers (e.g. Homebrew, NPM, Yarn, Pip, etc.) creates situations in which you don't know how to uninstall or upgrade certain pieces of software. Also, it's hard to generate a complete overview.

      How do you Linux folks handle this?

      Bonus question: How do you manage your dotfiles securely? I use Bitwarden, and it's a bit clunky.

      If that helps, I want to try Mint and always use Oh My ZSH!.

      6 votes
    13. Honest Question: Why did PHP remove dynamic properties in 8.x?

      I understand PHP has had many criticisms in the past but I'm not sure the existence of dynamic properties of instantiated objects was ever one of them. In fact, dynamic properties are pretty much...

      I understand PHP has had many criticisms in the past but I'm not sure the existence of dynamic properties of instantiated objects was ever one of them. In fact, dynamic properties are pretty much the hallmark of most interpreted or dynamic programming languages. Python allows it all the time and so do many others like Ruby, Perl, etc.

      I don't know what PHP developers achieved by removing dynamic properties feature from the language but one thing that resulted out of this is that many applications based on widely used veteran PHP frameworks (such as CodeIgniter and CakePHP) came to a halt all of a sudden due to an error like this after upgrading to PHP 8:

      A PHP Error was encountered
      Severity: 8192
      Message: Creation of dynamic property CI_URI::$config is deprecated
      Filename: core/URI.php
      Line Number: 102
      Backtrace:
      File: C:\xampp\htdocs\inv_perpus\index.php Line: 288 Function: require_once
      

      The influence of Corporate IT in various open source foundations is pretty well known and also well known is the extent to which corporate greed goes to achieve its interests and objectives across the world. The only way to assuage this uncomfortable thought (at least in this particular case) is to ask if there was any technical merit at all in removing dynamic properties feature from a dynamic programming language?

      I for one couldn't find any such merit here.

      12 votes
    14. 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
    15. 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
    16. 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...

      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?

      10 votes