• Activity
  • Votes
  • Comments
  • New
  • All activity
  • Showing only topics with the tag "programming". Back to normal view
    1. 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
    2. 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
    3. Best news sources and blogs to keep you informed about IT and Software Development

      To be honest, I've bookmarked many but I'm too busy to actually read any of them! But from now onwards, I've decided to give them a try at least once each day, I just want to know from you which...

      To be honest, I've bookmarked many but I'm too busy to actually read any of them! But from now onwards, I've decided to give them a try at least once each day, I just want to know from you which ones are better sources of information and which aren't. Feel free to add more to this list. In no particular order:

      12 votes
    4. FKCaps launches URSA keycaps for topre switches

      I'm not sure if anyone else here is into topre switch keyboards, but keycaps for topre are notoriously hard to find. Topre is niche within a niche, so options are limited. But for the last year or...

      I'm not sure if anyone else here is into topre switch keyboards, but keycaps for topre are notoriously hard to find. Topre is niche within a niche, so options are limited. But for the last year or so, FKCaps in collaboration with 23_Andreas have been working to launch keycaps in a new profile specifically designed for topre called URSA, compatible with HHKB, Leopold, and Realforce boards. They have now opened for pre-order, scheduled to be delivered in January 2025.

      I don't normally go for pre-orders or group buys, but I couldn't say no to this. The URSA profile and the caps themselves look great, and while I do enjoy the OEM keycaps on my HHKB, I also like having other options and trying new things. I've got a black HHKB Pro Hybrid Type-S, and I went with the black caps with legends. The mock-up image looks beautiful. I'm excited.

      If you're unfamiliar with the HHKB, or Happy Hacking Keyboard, it's a Unix-style board that has been around for 25 years, designed by a Japanese computer scientist because he wanted a more versatile board for programming and working in the command line on multiple operating systems. What makes the layout special, and why I enjoy it, is because the caps lock key has been replaced by a control key, and delete/backspace has been moved down a row for easier reach and to allow the tilde/backtick key to live on the top right. It's designed so you can easily reach everything from the homerow, and keys like the arrows, home, end, page up, page down are on a secondary layer accessed by the function key. Further, you can change board functionality through DIP switches on the bottom of the board. It's just so fun and pleasant to type on. Build quality is superb and these boards are known to stand the test of time.

      So if there are any other topre enthusiasts around here, I urge you to check URSA out. You can read more about the keycaps here.

      Your Happy Hacking Keyboard deserves some fresh caps (Verge)

      22 votes
    5. Chrome/Firefox Plugin to locally scrape data from multiple URLs

      As the title suggests, I am looking for a free chrome or firefox plugin that can locally scrape data from multiple URLs. To be a bit more precise, what I mean by it: A free chrome or firefox...

      As the title suggests, I am looking for a free chrome or firefox plugin that can locally scrape data from multiple URLs. To be a bit more precise, what I mean by it:

      • A free chrome or firefox plugin
      • Local scraping: it runs in the browser itself. No cloud computing or "credits" required to run
      • Scrape data: Collects predefined data from certain data fields within a website such as https://www.dastelefonbuch.de/Suche/Test
      • Infinite scroll: to load data that only loads once the browser scrolls down (kind of like in the page I linked above)

      I am not looking into programming my own scraper using python or anything similar. I have found plugins that "kind of" do what I am describing above, and about two weeks ago I found one that pretty much perfectly does what is described ("DataGrab"), but it starts asking to buy credits after running it a few times.

      My own list:

      • DataGrab: Excellent, apart from asking to buy credits after a while
      • SimpleScraper: Excellent, but asks to buy credits pretty much immediately
      • Easy Scraper: Works well for single pages, but no possibility to feed in multiple URLs to crawl
      • Instant Data Scraper: Works well for single pages and infinite scroll pages, but no possibility to feed in multiple URLs to crawl
      • "Data Scraper - Easy Web Scraping" / dataminer.io: Doesn't work well
      • Scrapy.org: Too much programming, but looks quite neat and well documented

      Any suggestions are highly welcome!

      Edit: A locally run executable or cmd-line based program would be fine too, as long as it just needs to be configured (e.g., creating a list of URLs stored in a .txt or .csv file) instead of coded (e.g., coding an infinite scroll function from scratch).

      8 votes
    6. React: Some comments from a beginner

      New job. I've been wanting to learn something new for a while, so I took a project where a lot of React is done. I'm learning it from scratch while I work with React. I have some comments about...

      New job. I've been wanting to learn something new for a while, so I took a project where a lot of React is done. I'm learning it from scratch while I work with React.

      I have some comments about it.

      1. React makes front end work a lot more like programming -- I like that!
      2. Javascript has changed a lot, and for the better, since I last used it over a decade ago.
      3. The React-Redux tool kit is the bomb. It should be integrated/absorbed into React. I can't see any reason not to use it, even for small applications as it is less wordy wherever you use it.
      4. The updating of state values should be more automatic, especially for flag variables not tied to GUI components. It is the major source of hassles with React
      5. Udemy React videos. My company makes them available free of charge to employees. I've sampled videos from a number of courses. I'm not a fan of the instructors showing you how to do things in older, less efficient ways first in a learning/demo project, the ERASING that code to do it a better way. The should include copies of the project at each stage if they do that. I finally figured out that the best way to take notes I can use later is to comment out the old code and put the new more efficient next stage stuff on top.
      6. React tests really need to improve. They are often more time consuming than the code itself. The tests have forced me to change my code or do needless testing to get the tests to pass. I had one situation where no matter what I did React test said I didn't cover the code until I broke an else clause off into it's one if clause. Blech.

      All in all I've been enjoying learning React. It is neat new ( to me ) thing.

      I feel sad that I will likely forget it all when I go back to my specialty language.

      16 votes
    7. Fun programming challenge: figure out which sets of passports grant visa-free access to the whole world

      Hey there, I wanted to know which sets of passports grant together visa-free access to every country in the world, but I could not easily find that info online. So I figured that I could try to...

      Hey there,

      I wanted to know which sets of passports grant together visa-free access to every country in the world, but I could not easily find that info online. So I figured that I could try to write a small program to determine these sets of passports myself, and then it occurred to me that it would probably be a fun programming challenge to organize, so here we go.


      Here's the challenge.

      1. Scrape the data you need for instance from The Henley Passport Index.
      2. Design a clever algorithm to efficiently find out which are the smallest sets of passports that will grant you visa-free access to every country in the world.
      3. Optional. Allow the user to specify which passports they already hold and find out which sets of passports would complement their passports well.
      4. Optional. Rank the sets of passports by how easy it is to acquire citizenship in those countries.

      The choice of the programming language is yours, bonus points if you write it in assembly 😂

      Feel free to collaborate and share your solutions (the algorithms and the actual results) in the comments, and feel free to share your own twists to the challenge that could make it even more fun & interesting.

      The person with the most clever, efficient and elegant algorithm wins!

      Happy coding folks!

      32 votes
    8. Is there a programming language that brings you joy?

      Just for a moment, forget all of the technical pros and cons, the static typing, just-in-time compilation, operator overloading, object orientation to the max... Is there a programming language...

      Just for a moment, forget all of the technical pros and cons, the static typing, just-in-time compilation, operator overloading, object orientation to the max...

      Is there a programming language that you've just found to be... fun?

      Is there one that you'd pick above all else for personal or company projects, if you had your druthers, because you would simply be so excited to use it?

      And then, is there something missing in that "fun" language that's preventing it from actually becoming a reality (i.e. small community, lack of libraries, maintenance ended in the 80s, etc.)?

      50 votes
    9. I want to learn Android (with Kotlin) ... should I focus on Jetpack or the old XML style?

      I am an experienced programmer (mostly M$ stack -- C#, etc). I started learning mobile Android development a few months ago, learning both Kotlin and the larger Android development environment at...

      I am an experienced programmer (mostly M$ stack -- C#, etc).

      I started learning mobile Android development a few months ago, learning both Kotlin and the larger Android development environment at the same time. I got bogged down in tutorials and guides, because half of them teach Jetpack Compose methodology and half teach XML layout ... and, often enough, don't bother to mention which method they're using.

      Which should I learn first? I am initially interested in learning Android dev for my own hobby/fun/side projects, but I would--ultimately--like to be able to put "Android developer" on my resume.

      Jetpack definitely looks better, more modern, more OO, and I expect it will eventually become the new standard ... but that could still be many years down the road. Also, while it might be "better"--especially for larger projects--it also smells more complicated.

      So, ultimately, I guess I should learn both if I actually intend to become an Android dev ... but I should definitely get comfortable with one, first ... so, which one?

      11 votes
    10. Is it possible (or normal) to release a Desktop GUI app using PIP/PyPI instead of regular tools like PyInstaller?

      Folks, Firstly, thank you for guiding me with remarkable insights to my queries about Desktop GUI development using PySide in my earlier post. After much thinking, pondering and meditation, I've...

      Folks,

      Firstly, thank you for guiding me with remarkable insights to my queries about Desktop GUI development using PySide in my earlier post.

      After much thinking, pondering and meditation, I've made up my mind with using PySide2 for this side project.

      Since my app is cross-platform and geared towards power users (who must be having python installed in all likelihood), I want to know if it's feasible to release it through PyPI (PIP) instead of bundling a setup or MSI? Or is this going to be a bit odd?

      Are there any such apps already that do this?

      10 votes
    11. Fortnightly Programming Q&A Thread

      General Programming Q&A thread! Ask any questions about programming, answer the questions of other users, or post suggestions for future threads. Don't forget to format your code using the triple...

      General Programming Q&A thread! Ask any questions about programming, answer the questions of other users, or post suggestions for future threads.

      Don't forget to format your code using the triple backticks or tildes:

      Here is my schema:
      
      ```sql
      CREATE TABLE article_to_warehouse (
        article_id   INTEGER
      , warehouse_id INTEGER
      )
      ;
      ```
      
      How do I add a `UNIQUE` constraint?
      
      4 votes
    12. "Java is fast but in practice, PHP sites run faster as PHP coders take more straightforward approach to design and don't get lost trying to implement exotic design patterns and endless abstractions"

      Granted that it's highly subjective and opinionated, but what this author James Anderson states in this StackOverflow post very much resembles the voices of many like myself who are trying to...

      Granted that it's highly subjective and opinionated, but what this author James Anderson states in this StackOverflow post very much resembles the voices of many like myself who are trying to switch from interpreted/dynamic languages to static and compiled ones like Java/C#. How do Java programmers tackle or respond to this stance?

      35 votes
    13. Fortnightly Programming Q&A Thread

      General Programming Q&A thread! Ask any questions about programming, answer the questions of other users, or post suggestions for future threads. Don't forget to format your code using the triple...

      General Programming Q&A thread! Ask any questions about programming, answer the questions of other users, or post suggestions for future threads.

      Don't forget to format your code using the triple backticks or tildes:

      Here is my schema:
      
      ```sql
      CREATE TABLE article_to_warehouse (
        article_id   INTEGER
      , warehouse_id INTEGER
      )
      ;
      ```
      
      How do I add a `UNIQUE` constraint?
      
      5 votes