Author: Rajeshwaran SP

  • Google AI Studio for WebPoller

    Today I got access to the Google AI Studio. There is a use case that I wanted to get started on. So here is the prompt I started off with

    • Imagine you are a ML engineer at a startup. Your company uses a custom programming language for building applications. It is now desired by your unit that the end users in your company will like to use a code agent to build applications using your custom programming language. How will you go about creating a model and train it for making it available to a LLM to help. Also the platform this is to be built on is Azure ML

    Gemini Code Assist Agent stated to work immediately. It was fascinating to see. Over the years, what as a software engineer I am used to do, the AI agent was doing. Thinking, Slicing into chunks, Narrating and finally providing a write up.

    I feel we are extremely lucky to live in this age where automation is going to define the next Technology Age. Here is the output from the Studio. I am going to take it on a spin next.

    Phase 1: Data Strategy & Curation (The Most Critical Phase)
    
    No model can learn without data. For a custom language, this is our biggest challenge and our most valuable asset.
    
    Objective: Create a high-quality dataset of (instruction, code_snippet) pairs.
    
    1. Data Sourcing - We'll be scavengers and creators:
    
        Existing Codebase: This is our gold mine. I'll write scripts to parse our entire production codebase.
    
            Source: Git repositories.
    
            Process:
    
                Extract functions/methods and their docstrings. This gives us (docstring, function_code) pairs.
    
                Parse unit tests. The test name/description and the test code itself form another valuable pair.
    
                Analyze commit messages. A commit like "Refactor user authentication logic" can be paired with the code diff.

    For a real quick project, here is a prompt that I supplied

    • Create a C# web application that will monitor the health of an external website. What we need the web application to do is poll the external website every 5 minutes (configurable) and record the status in a simple database. The web application should have a front end that accepts URL as the parameter. Make this application accept as many URLs as possible. For each URL that is monitored, display the health for the last 5 polls. Show as green if the polling succeeded and red if the polling is a failure.

    I tried this with Google AI Studio. I tried this same prompt on the Github Co-Pilot Chat as well on Visual Studio Code. But the Google AI Studio code was the one that compiled with Zero (0) Errors and Warnings. With the Github Co-Pilot after pondering for 30 minutes with debugging and fixing, I am yet to get it to run. Here is the screenshot from the Google AI Studio Generated Website.

  • Why I Choose Claude Over ChatGPT and Gemini

    After exploring ChatGPT, Gemini and Claude in the LLM space, I have decided to stick to one, Claude. As of me writing this all the 3 LLM’s have released newer and better versions. To me Claude does things natively which you have to prompt ChatGPT/Gemini. For me, Claude seems to understand my intent better and provide visual results intuitively.

    Here is an example. Recently I had a personal request to come up with a draft home plan for a house. Here is my prompt and the response from Claude. If you notice, Claude created a image as well as explained all the key features. You can easily see it was not correct the first time, but I was able to get it tweaked by asking Claude to fix it errors.

    For the same prompt with Gemini, here is what I received as response

  • Jupyter Notebook for C# – Install Guide

    If you are trying to install and try Jupyter Notebook for .Net (C#), you will see a lot of install instructions for the .Net Core 3.1.2 with dotnet-try command. .Net Core 3.1.2 is out of support. I had the same issue here and in this post, I am trying to document how to get Jupyter Notebook on my Windows machine to work with .Net code support.

    Install .Net Core Runtime

      Get the latest version of .Net Core installed from https://dotnet.microsoft.com/en-us/download. The version as of this writing is .Net 8.0

      Install dotnet-interactive

      Next, open up a terminal window and run the command below to install dotnet-interactive. You will receive a successfully installed message.

      dotnet tool install --global Microsoft.dotnet-interactive

      Install Jupyter

      In the terminal window issue the following command

      dotnet-interactive jupyter install
      

      Download and Install Anaconda

      This is required to run the Jupyter kernel. https://www.anaconda.com/download#

      Open Anaconda Prompt from the Start Menu. You can try the .Net CSharp for Jupyter by issuing the following command in the Anaconda prompt

      jupyter kernelspec list

      Now execute the following command to start a new notebook. This will start a browser instance with a new jupyter notebook web version interface.

      jupyter notebook

      Click on the ‘New’ button on the right top corner to create a new notebook.

      In the new notebook, you can pick the .Net (C#) kernel

      You have a Jupyter Notebook that supports C#

    1. Mobile Capability

      I have a Google Pixel 3 phone. Today at home, I was listening to songs using the JioSaavn app. This was streaming the songs via Google Home speaker in my living room. At that moment, my dad called me on WhatsApp voice call.

      At that moment, I thought that the songs will stop when the call comes through. My son attended the phone call and I was watching him. He switched the WhatsApp call to a video call. But the songs continued to play on the Home speaker. My initial thinking was this current song was already streamed and so it was able to play and I waited for the next song to begin. To my amazement, the songs continued with no interruption and the video call was fine as well.

      I was stuck in the olden days when you attend a phone call, it caused an interruption and the phone will react to the phone call causing all audio-related actions to pause.

    2. Dublin – St Patrick’s Day

      Last weekend was St Patrick’s Day celebration in Dublin, CA. In 2019, when we moved here, we had visited the parade to view. This time it reminded us of the school days when we used to go with our parents and friends to the Stadium in Neyveli for Independence Day.

      There was a St. Patrick’s Day parade and this year, we did participate in the Parade supporting DUSL. There were floats, vintage cars, all the schools and business that participated. It was a fun event.

      DUSL – Parade

      The city had also organized a festival at the Civic Center. A mini carnival with Irish music, dance, tea, sweets and stalls. There was also lot of fun carnival rides for kids. The kids had good fun.

      On Sunday, we participated in the Shamrock 5k Fun Walk and Run. We were able to get the walk done with kids in 1:02 hours. Good timing considering we took almost 2 hours the previous year.

      Overall, a fun weekend.

    3. Stationery – Pens, Pencils and Notebooks

      Most folks have fascination towards certain items. Among the things I have a fascination towards, stationery is one.

      As a kid, I remember those days as a kid carrying a school supplies list every summer to our hometown’s stationery shops. I think there was just 3 stores at that time in Neyveli, India. Balan, Swamy and Saradha book stores. These three stores sold all the text books as well as stationery in my home town. The school supplies list in my school days was to buy notebooks (ruled, unruled, math (square ones), four-line for cursive writing, two-line for Tamil writing) for each subject in school. The notebooks were to be wrapped in brown cover and labeled with name and class.

      Here is a nice video on the process.

      Just before school start in summer, the task before my dad and uncles was to wrap all the notebooks that was needed for that year in the brown wrapper neatly. It needed a label to be affixed to indicate which subject the notebook was for. As I got into higher grades, then myself and my sister used to do it ourself with help from dad.

      Apart from notebooks, pencils, pens, erasers, sharpeners were also part of the supplies. There was not a lot of brands to chose from. There was the classic black and red striped Natraj Pencils, Camlin Flora and Apsara pencils. Having a pencil with an eraser was a bonus. Most set of pencils had an eraser or a sharpener included for FREE. So there was no buying these separately. My mom used a knife to sharpen the pencil. All my friends were fans of how my mom sharpens the pencil. My mom used to sharpen pencils for my friends as well if they asked. Simple pleasures. At school, we used to write till the pencil was nearly an inch big before taking a new pencil. My kids don’t even remember where they placed their pencil from yesterday 😦

      Coming to pens, having a Pilot pen was a premium. My dad has the pen that he used in his graduation days with him now. Most fountain pens were eye dropper fountain pens. The problem with fountain pens is if they are not properly threaded, then they leak at the thread when you hold and write. My dad was crafty. Every time after he fills the ink, he will apply a layer of petroleum jelly on the thread before turning it in. That way, our pen never used to leak. I think we were asked to use Blue, Black and Red pens time to time. Using a green ink was reserved for officials.

      Diary: Every year around new years time, my dad used to receive diaries as gift. Since he got more than one, the extra ones were for my sister and me to grab. I used to preserve them without writing for the entire year. New ones must have meant something back then as well. After the year and once another one come, the older one was our scrap notebook.

      Now with the kids going to school, there is renewed interest in stationery. Here are the items that I use regularly

      Stationery is one, I believe, I will continue using even though digital tools are slowly replacing.

      NOTE: This is not a paid affiliate post. These are items that I buy and use.

    4. Cascadia Code and Oh-My-Posh

      Following Scott Hanselman’s Post on customizing the terminal, I have customized my windows box’s Terminal to use Cascadia Code PL font and the On-My-Posh Theme.

      PS Prompt

      My favorite font for programming was Monaco previously, until I discovered Cascadia Code PL. I have gotten to like it so much that now I have it as the font for SQL Editor, VS Code (both on Windows and mac), Bash Terminal, and Windows Terminal.

      Among the Oh-my-Posh themes, my personal favorite is ‘Spaceship’ that you see in the screenshot above. Exploring adding Oh-my-Posh to Bash next.

      You can find details about customizing at https://devblogs.microsoft.com/commandline/windows-terminal-tips-and-tricks/

    5. VS Code and Git

      As a developer finding the right editor and customizing it is one of personal preference. I had always like dark themes and was fascinated when working on Vi, Emacs, Notepad++ and TextMate. But the search for the best editor continues in my mind always.

      My primary job involves working with .Net and Visual Studio IDE is the preferred platform. I am comfortable using it, but it is huge when all you need is to edit a couple of documents. When Visual Studio Code was launched, I was excited and have used it as an editor in my office machines. Recently I am exploring my hands on using my personal Mac to try development of .Net apps.

      Now I have VS Code on the Mac and have setup the same exact way as in Windows. Dark Theme+ with Cascadia Code font from Microsoft. Recently, VS Code team has announced the browser editor. Use the . key to change the browser to VS Code Editor. I am fascinated by the first look and the advancement of how now the entire editor with all its features and customization can be brought over to the browser. I’m in love with it. Here is a screenshot of the browser editor and the VS code editor side by side.

      GitHub.dev and VS Code Local
    6. Trying .Net development on Mac

      Since my primary work involves programming with .Net, I have not used my personal laptop for programming other than fiddling with Python and Ruby sometimes.

      With .net core now supporting all platforms, want to start trying out development on Mac. Taking the first step towards that and installing Docker.

      Docker Install on Mac

      Will update the blog on my experience with .Net on Mac. Hello World to C# on Mac.

    7. Tryst with Guitar

      One nice spring morning, after a brunch at Country Waffles (one of the favorites), my wife got an idea of having our elder kid start with some music lesson. The reason such a thought occurred in the first place was because Country Waffles is right next to a Music Store which offers lessons. So after brunch, we all visited the music store to inquire about lessons offered for kids.

      My elder kid had reservations in getting to the music class. He liked the store, but not the idea of music lessons. Instead of us getting out of the store, the next idea that occurred to my wife was, if I go to class, then seeing me my kid will be encouraged to go. The idea of me going was because, when I came to US, I had expressed interest to learn guitar and what better time than now.

      Thus started my journey into the musical world. I got enrolled for a in-person one on one lesson for guitar. When I went for the first class, my instructor asked me what genre of music I was interested in learning. My entire musical knowledge is from listening to Tamil movie songs (musicals as it is called in USA). So I was clueless as to what to answer. I told my instructor that I was like a blank slate.

      I was regular for the first three to four months and then there was lot of issues going about in work, so had to take a break from guitar classes.

      I fiddle with the Guitar (purchased for the class) at-least once a week trying to play some songs based on tutorials on YouTube. My elder kid, still does not show interest in learning the instrument though. During school last year, during music class they played ‘Three Little Birds – Bob Marley’ and my elder one was boasting to the entire class, “My dad plays this song”. This song was my very first lesson with Guitar. Something that made me think that I have to do better.

      Hope one day, he gets interested in playing any instrument.

      Dedicated to the Rock Stars of MIT…