home.social

#devnote — Public Fediverse posts

Live and recent posts from across the Fediverse tagged #devnote, aggregated by home.social.

  1. Setting up android development tools on Mac (either react-native based or flutter based) is so damn hard.

    Be it go or python or even front-end frameworks like #preactjs or #vuejs , they are easy to get started (on Mac).

    Getting started with mobile development is so hard on Mac. Why?

    I followed instructions on https://reactnative.dev/ / https://docs.flutter.dev/get-started/install still no luck.

    I even tried Claude. Nothing worked.

    The last error I got related to too many files open. Tried everything in this: https://github.com/facebook/watchman/issues/923 still no luck.

    I have developed apps for Palm OS. It wasn't that hard to develop an app and install on your device, even though it was around two decades back.

    #devnote #gptusage

  2. damn! setting up mac to build mobile apps is still hard - be it react native or flutter.

    it shouldn't be

    #devnote

  3. I uploaded a screenshot of a login page I liked to #claudeai and asked to write code.

    Act as a UI designer. Look at the enclosed image and design the same in plain HTML and CSS. Use Tachyons css for styling. Pick a Google font that resembles the font in the image.

    The generated code is not perfect but it is close to the screenshot. It is becoming more and more easy to write code with Claude.

    I might use this login page design for @thoughttonote

    #devnote #gptusage

  4. As I develop @thoughttonote using #llms, I repeatedly face a issue regarding debugging:

    You can write a component or a function giving appropriate prompt. When you want to add a feature, then it is an issue. I face the same issue while debugging too.

    As an example, using #claudeai , I developed a #preactjs component that records audio on the browser. It works well. Now I want to display a timer as it records.

    I have the option to recreate the entire component or I have to upload the earlier code into Claude and ask it to add that particular feature.

    So far, I have chosen the 1st option - recreate.

    May be the way we develop software will change as llms are integrated into development process (much like how google and stackoverflow changed it).

    #devnote

  5. Exactly a month ago, I posted about me developing a new application using #genai : https://cpn.jjude.com/@jjude/statuses/01J3C4WZZ4SZ5SF4ZY3QQYPQ53

    Today I deployed the app to a server (render) so my friends and I can test it: https://mas.to/@thoughttonote/113005394074283971

    Happy about this progress. Will post more about it as I go along.

    #devnote #t2n

  6. An example of GPTs being rubber-ducks that can reason ...

    In an earlier toot, I mentioned that GPTs are rubber-ducks that can reason.

    Design a preact component called "settings" that has two fields and a button: name and style. Name is a single line text field. Style is a multi-line text field. Button is "save". When it is displayed, it should load a token from the localstorage (stored with localforge) and call the backend api to fetch these details. When clicking save, it should send the details to backend api to save. If there are any errors it should display the error in red color and stay in the same screen. If there are no errors, it should goto home page.

    It went about giving me this code:

    class Settings extends Component {
      state = {
        name: '',
        style: '',
        error: null,
        loading: true
      };
    
      componentDidMount() {
        this.fetchSettings();
      }
    ...
    }
    

    I read through the code before copying. I was wondering if I should use usestate or this form of having component variables. So I asked:

    I don't know preact. so this question could be stupid. should you use usestate to manage state or just assigning variables to state variable as you have mentioned in this last code block is ok?

    Guess what, Claude responded with this:

    Your question isn't stupid at all - it's a great one! The approach to managing state in Preact (and React) has evolved over time, and there are indeed different ways to handle it. Let me explain:

    1. Class Components (what I showed): In the code I provided, I used a class component with this.state. This is an older but still valid way of managing state in Preact/React.
    2. Functional Components with Hooks (modern approach): The more modern and now preferred way is to use functional components with hooks, specifically useState.

    It reasons! It teaches. So it is not a dump portal from which I copy code (remember Stackoverflow?). Now I can understand the code I make.

    #devnote #gptusage

  7. GPTs are rubber-ducks that can reason

    Every developer has an experience of talking to a rubber-duck to debug. I don't know about you. But rubber-ducks have rescued me from deep shit-holes countless times.

    Rubber-duck debugging goes something like this:

    • Place rubber duck on desk
    • Explain to the duck what your code is supposed to do
    • Explain your code line by line
    • At some point you will tell the duck what you are doing next and then realize that that is not in fact what you are actually doing
    • The duck will sit there serenely, happy in the knowledge that it has helped you on your way.

    Since the harmless duck won't judge you, you enjoy going back to it with all your troubles and find a way out as you speak to it.

    But ducks don't reason out with you. It is all up to you to figure out what you are doing wrong.

    You could use a fellow developer as a duck. But those fleshly brains come with a huge disadvantage: they judge. Yikes. Last thing you want to hear when stuck in a pit is a snarky comment.

    Enter GPTs - Claude & ChatGPT.

    They are smart rubber-ducks.

    You can reason with them. They help you analyze code. And they can teach you a thing or two too.

    The more I use these smart rubber-ducks, the more I love them.

    What about you?

    #gptusage #devnote

  8. https://coderabbit.ai/ - code reviews by AI. Seems to be a good tool to add to ci/cd #devops pipeline.

    Have to validate though how good it is. If it works, it can improve operational efficiency of dev teams.

    #devnote #ctotool

  9. How to Create a Local AI Coding Assistant for Free

    Detailed step by step instruction to run #codeqwen locally and get coding help in #vscode

    src: https://www.davegray.codes/posts/bye-copilot-how-to-create-a-local-ai-coding-assistant-for-free

    Definitely something #todo soon.

    #gptusage #devnote

  10. How to Create a Local AI Coding Assistant for Free

    Detailed step by step instruction to run #codeqwen locally and get coding help in #vscode

    src: https://www.davegray.codes/posts/bye-copilot-how-to-create-a-local-ai-coding-assistant-for-free

    Definitely something #todo soon.

    #gptusage #devnote

  11. How to Create a Local AI Coding Assistant for Free

    Detailed step by step instruction to run #codeqwen locally and get coding help in #vscode

    src: https://www.davegray.codes/posts/bye-copilot-how-to-create-a-local-ai-coding-assistant-for-free

    Definitely something #todo soon.

    #gptusage #devnote

  12. Polyfill supply-chain attack

    @simon 's post here is a good summary: https://simonwillison.net/2024/Jun/25/polyfill-supply-chain-attack/

    Short version:

    if you are loading assets from the cdn.polyfill.io domain you need to remove that right now: the new owners of the domain (as of a few months ago) appear to be using it to serve malicious JavaScript.

    How it works: https://github.com/polyfillpolyfill/polyfill-service/issues/2873#issuecomment-2182491302

    The request will return the original polyfill code, appended with a piece of malicious code. This code will make a run javascript from https://www.googie-anaiytics.com/ga.js , if the device is not a laptop.

    What needs to be done to mitigate (choose one or both):

    • From Andrew Betts, the original author of the service:

    remove it IMMEDIATELY

    Why?

    Most features added to the web platform are quickly adopted by all major browsers, with some exceptions that generally can't be polyfilled anyway, like Web Serial and Web Bluetooth.

    src: https://github.com/polyfillpolyfill/polyfill-service/issues/2873#issuecomment-2189994261
    Also: https://community.fastly.com/t/new-options-for-polyfill-io-users/2540

    To reduce supply-chain attacks in the future:

    Use Subresource Integrity: https://developer.mozilla.org/en-US/docs/Web/Security/Subresource_Integrity

    Because of the way polyfill works, SRI won't help for this issue. But SRI reduces other supply-chain attacks.

    #devnote #security #polyfill

  13. Intercept & view all your HTTP(S) Mock endpoints or entire servers: @httptoolkit

    Should be useful to develop and debug. Alternative to fiddler and charles. Open source tool

    download here: https://httptoolkit.com/
    source: https://github.com/httptoolkit/httptoolkit-ui

    (cool to find an AP handle for a developer tool kit ;-) )

    #devnote #tools