• Activity
  • Votes
  • Comments
  • New
  • All activity
  • Showing only topics in ~comp with the tag "programming". Back to normal view / Search all groups
    1. 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!

      30 votes
    2. 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
    3. 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
    4. 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
    5. 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
    6. "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
    7. 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
    8. How would you structure an Open Collective with the objective of teaching programming to raise money for a cause?

      I am asking as I have just created one. I won't advertise it here, as it feels not in good faith and I don't think Tildes is the right audience (I imagine most of the techies here are probably...

      I am asking as I have just created one. I won't advertise it here, as it feels not in good faith and I don't think Tildes is the right audience (I imagine most of the techies here are probably fairly seasoned).

      I want to offer some kind of programming tuition to people at a good rate (read: affordable to those that might be on a low income but wish to learn). I am doing this to raise money for my local cardiology ward, who have just been told there isn't enough in the budget to cover their Christmas party this year. Morale is low there, and I'd like to help cover the deficit.

      How would you structure something like this?

      Initially, I have written that I have no set fee and am happy to offer services on case-by-case basis (words to that effect). But in a discussion with a friend, they suggested I should do something like:

      • Small donation (£1 - £25): Access to a chatroom (Discord?) where someone can ask questions, and I'll strive to answer and help them as fast as possible)
      • Medium donation (£25 - £50): I will arrange a group session where I cover some basic programming concepts and host a Q&A at the end to help bridge any gaps in understanding.
      • Large donation (£50+): I will arrange a one-to-one session (via call, video or instant messaging) where I will help go more in-depth on a topic or help debug a specific problem.

      If anyone has any experience with this type of thing, I'd appreciate any advice. I have only been a professional software developer for three years, so I am reasonably experienced, but not exactly an industry veteran. I want to set realistic expectations for this service.

      I'm happy to share a link to the open collective via private message if anyone wants to have a look over it and offer any advice.

      9 votes
    9. Why do so many developers provide only 64-bit or x64 builds of their software these days?

      Doesn't it make sense to only provide 32-bit versions to cover maximum user base? Considering that 64-bit operating systems do support 32-bit apps whereas the inverse isn't true. If you release...

      Doesn't it make sense to only provide 32-bit versions to cover maximum user base? Considering that 64-bit operating systems do support 32-bit apps whereas the inverse isn't true.

      If you release for x32, you'd have covered the maximum users whereas if you release for x64, you'd have covered only that block. At least open source developers who intend for maximum coverage or user-base for their apps should support at least 32-bit (if not both).

      Below is a great answer post in this regard, credits Ken Gregg on Quora:

      Yes, there are a lot of 32-bit programs still being developed/sold/distributed. No, not every program is 64-bit.

      64-bit operating systems on 64-bit hardware can run 32-bit applications. And there are lots of computers still running 32-bit operating systems (and will for quite some time). So, an application developer can release one 32-bit product and cover the 32-bit and 64-bit customers. Releasing and maintaining two products, one 32-bit and one 64-bit, incurs some costs. And providing only a 64-bit version leaves all the 32-bit customers in the dust. It is logical and cost-effective to supply only a 32-bit version to cover both groups, as long as the application doesn’t require 64-bit features.

      Of course, the embedded systems arena still has tons of new development of 32-bit, 16-bit, and even 8-bit software/firmware. The choice of an embedded microcontroller is based on cost, availability, and features required, so software developed in this realm runs the gamut of bitness.

      21 votes
    10. 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?
      
      7 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?
      
      6 votes
    12. 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
    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?
      
      7 votes
    14. 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?
      
      2 votes
    15. 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
    16. 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?
      
      2 votes
    17. 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?
      
      16 votes
    18. Programming Challenge: Implementing bitwise operators.

      Background: Bitwise operators are operators that perform conditional operations at the binary level. These operators are bitwise AND &, bitwise OR |, bitwise XOR ^, and bitwise NOT ~, not to be...

      Background: Bitwise operators are operators that perform conditional operations at the binary level. These operators are bitwise AND &, bitwise OR |, bitwise XOR ^, and bitwise NOT ~, not to be confused with their logical operator counterparts, i.e. &&, ||, !=, and ! respectively.

      Specifically, these operations take the binary values of the left- and right-hand terms and perform the conditional operation on each matching bit position between both values.

      For instance, 3 | 4 takes the binary value 010 from 2 and 100 from 4. From left to right, we compare 0 || 1, 1 || 0, and 0 || 0 to get 110 as the resulting binary. This produces the integer value 6.

      Goal: Your challenge is to implement one or more of these bitwise operators without using the native operators provided to you by your language of choice. Logical operators are allowed, however. These operators should work on integer values. These operators will likely take on the form of a function or method that accepts two arguments.

      Bonus challenges:

      • Implement all of the operators.
      • Don't use any native binary conversion utilities.
      • Whether or not you implement all operators, write your code in such a way that allows for good code reusability.
      • For statically typed languages, handle integers of different types (e.g. int vs. uint).

      Edit: Minor correction for the sake of accuracy, courtesy of @teaearlgraycold.

      12 votes
    19. 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
    20. Are there any good programming podcasts to listen these days?

      When I visit Youtube, their algorithms somehow always manage to come up with the most provocative and mind aggravating political videos and force me to watch them! I go there to do something else...

      When I visit Youtube, their algorithms somehow always manage to come up with the most provocative and mind aggravating political videos and force me to watch them! I go there to do something else and then it takes an entirely different direction.

      I've decided to switch to listening to podcasts for a change, do you know any good one, especially in the areas of Web Development, Engineering Stories, Desktop Development, Windows/Linux, etc.?

      34 votes