• 1 Post
  • 66 Comments
Joined 2 years ago
cake
Cake day: April 19th, 2023

help-circle
  • I can’t get what it describes through all the Jedi stuff and jokes.

    One mentor and one apprentice? And everything else remains unspecified and open?

    For FOSS, as it is described, it makes me think it’s a big investment with unclear risk (will they even stay as a contributor?). Which of course can be contextualized - but then what is left here?


  • I sometimes do things (cleanup, refacs) off-ticket / not part of the ticket. It can be a light alternative when other stuff is complicated and demotivating. Depending on your environment and team/contract setup, simply doing it could be more difficult though.

    If it serves your satisfaction and productivity, and is good for the product, then it’s not wasted. Not everything has to be - or even can be - preplanned.



  • I don’t have experience with that in particular. I’ll share my more general, tangential thoughts.

    MVP is minimal. Extending the scope like that makes me very skeptical (towards scoping and the processes).

    Everything you are concerned with would be important topics for retrospectives, or even meetings with management. But of course those don’t exist or are open in all environments. In my team I could openly raise such concerns.

    If you’re always rushing to a deadline, or feel like that, think of what you can do and influence to improve that. Retrospectives? Team disuscussions? Partly tuning out of management given focus and doing what you deem important and right? Look for a different team or employer?




  • The title question is very broad, varied, and difficult. It depends.

    For anything that is not a small script or small, obvious and obviously scoped takes, you can’t assess at first glance.

    So for a project/task/extension like you wrote it’s a matter of:

    Is there docs or guide specifically for what I want to do/add? If yes, the expectation is it is viable and reasonably doable with low risk.

    If there is no guide the assessment is already an exploration and analysis. How is the project structured, is there docs for it or my concerns, where do I expect it as to go and what does it have to touch, what’s the risks of issues and unknown difficulties and efforts. The next step would already be prototyping, and then implementing. Both of which can be started with a “let’s see” and timebox approach where you remain mindful of when known or invested effort or risk increases and you can stop or rethink.




  • Contributing to existing projects as an introduction is very hit or miss. Project and task complexity vary immensely, supporting docs and guidance are most often non existent.

    I love Advent of code as a concept, but I agree - at least the ones I worked on - have a steep difficulty/scope curve.

    Something like a tic tac toe game is great because it is visual, interactive, and iterative as well as relatively small in scope. Any project you have a personal interest in and that has some or most of those properties is great.

    The Web technologies HTML css and js are great to get into programming but I feel like it’s bad for teaching software development as software engineering, because it doesn’t guide towards or ensure structuring and good practices. Which I thought you were talking about at first, but I guess you’re not at that point yet with on and off beginnings.

    Going back to your original description, functions encapsulate a work unit. Use it to name and define behavior so that you can combine and hide away complexity in a defined and obvious manner. Separation makes overall complexity manageable because you can look at subsection of it.

    How did your tic tac toe game go? Was that something that worked out well?

    Have you looked at other projects? For example other tic tac toe implementations and how they did it? Which can be hit or miss in quality and readability of course.

    In my opinion the best way to learn, or environment to learn, is teaching or/and guidance through a good senior. The second best is interest and personal projects. Even if it’s small hacks or projects, and even “unfinished” projects can give experience and knowledge.



  • Are people, their critics, really bothered with the writing aspect of verbose code?

    Verbose code - and their example shows it quite well - is less concise. To me, their example and reasoning looks more overly verbose, over-engineered rather than well or thoroughly designed and safe.

    What makes more sense depends on the context. Where is and will it be used? What is it being exposed to?

    A simple data holding class for one “internal” layer to the next can have a very simple form, so it’s easily understood. It may not be safe against misuse or mistakes, but the simplicity and clear use-case and intention much outweighs those costly safeguards to me. For maintainability, for readability, for clarity.

    It’s always a balancing act between simplicity and easy understanding vs safeguards and costs. If there’s less risk you can make it much simpler - which reduces other, less obvious risks and costs.


    The example made me immediately spot how C# quite a while ago introduced language constructs for what would otherwise be a lot of boilerplate programming like they do in their example.

    public record Reservation(DateTimeOffset Date, string Email, string Name, int Quantity, bool IsAccepted);
    

    no need for 78 lines of code with 9 methods.

    C# also has the with keyword for copy-adjusting immutable types.

    And required init syntax provides another alternative for an effectively immutable type.

    public class Reservation
    {
        public required DateTimeOffset Date { get; init; }
        public required string Email { get; init; }
        public required string Name { get; init; }
        public required int Quantity { get; init; }
        public required bool IsAccepted { get; init; }
    }
    

  • I’m mostly programming C# at my job (and private too now), and am quite fond of the language and ecosystem/basis. I tend to create even small utilities and one-off things with it. (Since C# 9 top level statements allow you to create the program entry point without a Main method - it becomes implicit/generated.)

    I also find nushell quite interesting. It provides both a shell and scripting interface, and some promising concepts. I still have difficulties creating more complex command queries and scripts because the syntax is still foreign to me - and because you fall back to other tools when there’s a need.

    If compatibility is a concern it’s still back to bash, pwsh, bat. They have functions and files too, so at least some sectioning and factoring is possible.



  • You won’t be stuck. You can always reevaluate and change employer later too.

    You can’t know many things, like work environment, leadership style, beforehand. After assessment before and during interviews, you’ll have to get and and see.

    Given that you seem to weigh meaning and impact quite high, I suggest

    • check for jobs for Non-profits and rights/citizen protection government orgs
    • check companies and industries you’re interested in
    • consider smaller companies where you have an impact, and where you have or serve a product

    You can get an idea of roles and availability from job offers/seekings.

    Consider practicality; setting for a reasonable job first, and then taking the time outside of it to seek opportunities, alternatives, or contribute.



  • Kissaki@feddit.detoProgramming@programming.devIs there something better than SQL?
    link
    fedilink
    English
    arrow-up
    23
    arrow-down
    1
    ·
    edit-2
    1 year ago

    most programmers aren’t DB experts and the SQL they output is quite often terrible.

    Isn’t that looking at it the wrong way / missing the point?

    If you’re fine with simple queries, use an ORM of your tech stack. Once you have to understand querying performance and weigh usage patterns, constraints, and cache performance and size, then it’s not about SQL anymore. It’s about understanding the DBMS you use.

    You may ask “why can’t I use a different language for the querying part of it”. But I haven’t seen anything better yet.

    Having a common, well-understood, established, documented, inter-product compatible language has a lot of value. Using a different language to the well-established industry standard is in itself an increased hurdle to adoption.

    Getting back to the original quote: I don’t think anything else would serve bad developers / non-experts any better.



  • The “best way” depends on the project and its need, or immediate most pressing needs. You may refer to their contrib docs or ask.

    But generally, any quantity and quality contribution helps. Community support and issue reproducibility and testing being low-barrier entry ones. Next lowest barriers being translation and documentation.


  • How are we still not past three-splitting content…

    It’s not as shit as twitter UI/UX/Accessibility - but this mastodon split-post doesn’t make me feel much better.

    /edit: Actually, it’s a 5-split.


    I’ll do what lemmy-post-OP didn’t and copy the content for accessibility:

    Ashley Gullen:

    If you thought JavaScript was a mess, here’s what it takes to pass a file path to a Windows API in C++: 🧵

    1. Windows uses UTF-16, but most modern software uses UTF-8
    2. Converting UTF-8 to UTF-16 requires calling MultiByteToWideChar twice (once for size, second to convert)
    3. Alternatively you can set the process code page to UTF-8 and call the ‘A’ variant API directly, but only sometimes, and only with Windows 10 v1903+, and you might still have to change the system locale setting and reboot
    4. Now you can pass a file path! But…
    5. The path is limited to MAX_PATH (260 chars)
    6. Unless you prefix the path with \\?\
    7. However using \\?\ disables automatic conversion of / to \ in the path (and some other normalization)
    8. Alternatively set a reg key LongPathsEnabled, but only with Windows 10 v1607+ and the app needs to opt in to longPathAware, and changing the registry might need a reboot
    9. Even then not all Windows APIs support longer paths, e.g. PathCanonicalize. Swap for PathCchCanonicalizeEx with PATHCCH_ALLOW_LONG_PATHS, etc. Check docs per API.
    10. Congratulations, your app can pass a long file path to Windows! But the shell still doesn’t support long paths. So your app can write to long paths, but you can’t access them with Windows Explorer. Even in Windows 11.
    11. If the API returns a path, do all that in reverse.

    I probably missed a few other details and quirks.

    References:

    See also individual APIs e.g. https://learn.microsoft.com/en-us/windows/win32/api/shlwapi/nf-shlwapi-pathcanonicalizea

    Unrelated promotional text and link