25 June 2023

The creation of GrootGPT

When ChatGPT was first released, I tried creating a basic Android app using ChatGPT. When a developer created Flappy Bird using ChatGPT, I considered creating a web-page the same way.  Building a static web page would be boring, so on 28th May 2023, I thought it'd be fun to make an interactive page that replies like Groot. Turns out, I'm not the only one who had this idea. 

Anyway, this is the GrootGPT which I built without typing any code. ChatGPT created and refined the code based on prompts I gave it. GrootGPT is unique, with the ability to output emoticons to user prompts that reflect specific emotions:


Prompt Engineering

First, it helps to prime ChatGPT about what you want it to do. There's a skill people need to have, to perform Prompt Engineering. There's a comprehensive guide here and a nice summary here.

I found this prompting guide too on the internet. 

  • Tone: Specify the desired tone (e.g., formal, casual, informative, persuasive).
  • Format: Define the format or structure (e.g., essay, bullet points, outline).
  • Act as: Indicate a role or perspective to adopt (e.g., expert, critic, enthusiast).
  • Objective: State the goal or purpose of the response (e.g., inform, persuade).
  • Context: Provide background information, data, or context for content generation.
  • Scope: Define the scope or range of the topic.
  • Keywords: List important keywords or phrases to be included.
  • Limitations: Specify constraints, such as word or character count.
  • Examples: Provide examples of desired style, structure, or content.
  • Deadline: Mention deadlines or time frames for time-sensitive responses.
  • Audience: Specify the target audience for tailored content.
  • Language: Indicate the language for the response, if different from the prompt.
  • Citations: Request the inclusion of citations or sources to support information.
  • Points of view: Ask AI to consider multiple perspectives or opinions.
  • Counterarguments: Request addressing potential counterarguments.
  • Terminology: Specify industry-specific or technical terms to use or avoid.
  • Analogies: Ask AI to use analogies or examples to clarify concepts.
  • Quotes: Request inclusion of relevant quotes or statements from experts.
  • Statistics: Encourage the use of statistics or data to support claims.
  • Call to action: Request a clear call to action or next steps.
  • Sensitivity: Mention sensitive topics or issues to be handled with care or avoided.

The bullet points above were actually in an image. I used Tesseract OCR to convert it to text, using tesseract --dpi 160 -l eng theImage.png output.

The process of building GrootGPT

I began by telling ChatGPT what I intended to do:

Me: I want to create a program

ChatGPT: That's great! I'd be happy to help you with creating a program. Could you please provide some details about the program you would like to create? Specifically, let me know what the program should do or any specific requirements you have in mind.

Me: I want a simple html page which contains a chatbox that resembles the chatgpt chat

It generated code which the browser rendered as this:

Initial chatbox generated

 

However, entering text and clicking "Send" did nothing. So I asked ChatGPT to add that functionality.

Me: please modify the code so that the user can press enter to submit a chat message.

ChatGPT: Certainly! To enable submitting a chat message by pressing Enter, you can add an event listener to the input field. Here's the modified code with that functionality:


Chatbox now allows input and responds

Now the chatbox responded too. It was interesting that the generated code was already primed to show messages at the left and right sides of the box.

Then I gave it a series of instructions, to each of which it modified the code to suit my requirement. Some of the instructions were: 

Me: Please modify the program to have the following characteristics: Firstly, the background should be dark grey. Secondly, the title of the page should be "Groot GPT". Thirdly, the background of the chatbox should be light grey.

Me: please modify the code such that the text of the chat should be black. the chatbox and the input box should be centered. The maximum of the chatbox and input box should be 400 pixels. The chats of the first user should have  a light blue background and the chats of the second user should have a pale orange background.

Me: all responses and initial message from the bot should be "I am Groot". Also, please change the colour of the pale orange background to a pale green background.

Me: please modify the code with the following: The edges of the chatbox need to be curved.  Please make the outer border of the chatbox 5 pixels thick.  Align the "Send" button's right end with the right end of the chatbox. Make the chatbox background 20% darker.  Change the "Type your message" to "Chat with Groot". Provide circular profile photos for both users of the chat.

Me: provide a floating menu bar at the top of the page and a thin shadow below the menu bar. The extreme right side of the menu bar should have a text "Groot GPT" and the extreme left side of the menu bar should have one buttons. The  button should have text "About". The background colour of the menu bar should be the dark brown color of groot of guardians of the galaxy. The button of the menu bar should be the green color of an evergreen tree leaf.

Me: you made a mistake with left and right.  Please swap positions of the text and button in the menu bar.  Also, please align both sides of the chat textbox and button with the chat display. If the "About" button is clicked, it should display a lightbox with the following text "Created by Navin".

 

I wanted to see if it'd be able to use an image from the internet.

 

Me: please use the icon from this page https://icon-library.com/images/small-heart-icon/small-heart-icon-17.jpg for the assistant and use the icon from this page https://icon-library.com/images/small-heart-icon/small-heart-icon-4.jpg for the user. Change position of the "about" button to the extreme left of the screen and change position of the "GrootGPT" text on the menu bar to the extreme right of the screen.  Ensure that the menu bar does not cross page limits. Make the menu bar colour lighter brown. 

Progress so far. The lightbox content was rendered wrongly

It didn't really understand the meaning of left and right. Even if it generated the code correctly once, by the time I prompted it again, it'd swap back the widgets to the wrong sides of the page.

Me: I asked you to swap places of the menu bar's about button and the "groot GPT" text. Please do it.

ChatGPT: Apologies for the confusion. Here's the updated code with the About button on the right and the "Groot GPT" text on the left of the menu bar: <code>

Me: please replace both profile images with dummy image names named "profile1.jpg" and "profile2.jpg". Ensure that all chats shown on the right side are chats of the user and all chats shown on the left side are chats of the assistant. When the page is initially shown, the lightbox should not appear. The lightbox should be displayed only when the "about" button is clicked. When the lightbox is shown, the background of the entire page should be dimmed and the lightbox should be shown clearly with a light brown background and a default close button.

ChatGPT: Apologies for the oversight. Here's the updated code with the changes you requested:<code>

Me: when the page opens, only the assistant should say "I am groot". The user should not say "I am groot". Also, please swap positions of the "About" button and the "Groot GPT" text on the menu bar. 

 

ChatGPT is still unable to "understand" that I want the widgets at specific places.


Me: do you understand what i mean by swapping positions of two widgets?

ChatGPT: Apologies for the confusion earlier. I misunderstood your request. To swap the positions of the "About" button and the "Groot GPT" text on the menu bar, you can update the code as follows: <code>

Me: ok then. Please swap the positions as you have understood and ensure that all elements of the menu bar are within page limits.

ChatGPT: Apologies for any confusion caused. Here's the updated code with the swapped positions of the "About" button and the "Groot GPT" text on the menu bar, while ensuring that all elements of the menu bar stay within the page limits: <code>

Me: Display the "Groot GPT" text at the extreme left of the menu bar and display the "About" button at the extreme right of the menu bar. Ensure that the menu bar is within page limits. Make the page background color #242124. Make the "About" button color  #8bc34a. Make the "Groot GPT" text bold and give it the color #c5e1a5. Make the menu bar color #324406.

By now a basic lightbox showed up well on clicking the About button

 

Since a simple chat was boring, I decided to incorporate some simple sentiment analysis to display emotions.


Me: Could you create an algorithm that performs a simple sentiment analysis for the emotions of happiness, sadness, anger, frustration and determination?

 

But ChatGPT created the code in Python instead of JavaScript.


Me: The functions should not be in python. The functions are intended to be used in the html code you generated earlier

 

Then it generated the code in JavaScript. When I didn't understand some part of the code, I could even ask ChatGPT to explain the code to me.


Me: which part of the code will invoke getemoticon and which part of the code will send the user input to the getemoticon function?

ChatGPT: To invoke the getEmoticon() function and send the user input for sentiment analysis, you can modify the existing JavaScript code that handles user input and chat message rendering. Here's an example of how you can incorporate the getEmoticon() function into your JavaScript code: <code> In the above code, the handleUserInput() function is called when the send button is clicked (or when the form is submitted, if you're using a form). Inside this function, the user input is retrieved from the input box (inputBox.value) and then cleared (inputBox.value = ''). After that, the getEmoticon() function is invoked with the user input to determine the appropriate emoticon. The resulting emoticon is then appended to the chat message element, which is created and styled accordingly. The chat message element is then appended to the chat box. You can adjust this code according to your specific implementation, but this should give you an idea of how to incorporate the getEmoticon() function and handle user input in your existing JavaScript code.


I soon realized that I didn't have to type out different words. ChatGPT could automatically find and list out words related to a particular emotion. 

Me: For happiness, you had generated var happinessKeywords = ["happy", "joyful", "excited", "delighted"];. I want you to generate a hundred words that represent happiness in various tenses.

It generated a vertical list of bulleted points containing a hundred words that represent happiness. So I had to ask it to put those words in an array, and then asked it to generate words for other emotions too.

Me: place all the 100 generated words in an array like this var happinessKeywords = ["happy", "joyful", "excited", "delighted"];

Me: Generate a hundred sadness keywords like this var sadnessKeywords = ["sad", "unhappy", "depressed", "disappointed"]; in an array in a single line. 

Since it generated the entire code after each prompt, I started asking it to generate only snippets of the code that needed modification. But this brought the dilemma of understanding where to insert the code manually. I realized that I could ask it to give me hints for that too.

Me: which part of the code should i use the window.onload function?

Me: I want you to adjust the css of input-box in such a way that the input box and the send button are shown at the centre of the chatbox

ChatGPT: To center the input box and the send button within the chatbox, you can apply CSS styles to the input-box class. Here's an example of how you can modify the CSS:

.input-box {
  display: flex;
  justify-content: center;
  align-items: center;
}
This CSS code uses flexbox properties to horizontally center the content of the input-box class. The justify-content: center property centers the content along the horizontal axis, and the align-items: center property centers the content along the vertical axis. Make sure to add this CSS code within the <style> tags or your CSS file. By applying these styles, the input box and the send button will be positioned at the center of the chatbox.

Me: that did not work. the input box and button are still aligned to the left of the chatbox. How to align them to the centre?

ChatGPT: Apologies for the confusion. If the previous CSS code didn't work as expected, you can try the following approach to center the input box and send button within the chatbox:

.input-box {
  text-align: center;
}

.input-box input[type="text"],
.input-box button {
  display: inline-block;
}

.input-box button {
  margin-left: 10px; /* Adjust the margin as needed */
}

In this updated CSS code, we set the text-align property of the .input-box class to center to horizontally align the content within the input box and send button. Additionally, we use display: inline-block for the input text and button elements to allow them to be horizontally centered. You can adjust the margin-left property of the button to add spacing between the input box and the button if needed. Remember to place this CSS code within the <style> tags or your CSS file. Please give it a try and let me know if it works as expected.

Me: how would you alter the code if you wanted to make it mobile friendly?

For the profile images, I used StableDiffusionOnline.

Some of the profile images generated on prompting StableDiffusionOnline

In this manner, I made it generate code to add a visitor counter, made the page more mobile friendly and made various adjustments that brought it to the final state you see in this page. The code that was finally generated is available here.

It took 70 prompts, around 5 hours (including my eye rest breaks) and a few manual tweaks to the code, to create GrootGPT.

Learning

At the time I created this, I hadn't gone through the various guides on Prompt Engineering. I tried communicating in English, since my objective was also to later add a voice prompt to invoke ChatGPT via an API. The process of creating the page showed me some critical flaws of Large Language Models not really understanding what was told to them. The "understanding" was merely a complex form of Cosine Similarity and token prediction. Transformers are indeed impressive, and GPT4 is said to be capable of generating a website from a scribble. However, GPT is still like Eliza. "Intelligence" is still in our brains. We are yet to find a way transfer it to algorithms.  However, as GitHub Copilot and similar projects have shown, Machine Learning algorithms are great for assisting us and reducing the grunt-work we go through.

It's not necessary that big-tech companies rule the roost when it comes to generative AI. Projects like gpt4all, Freedom GPT, privateGPT and frameworks like Mojo hold promise.After Meta made LLaMA open source, Google is said to have felt the pinch. would big-tech really let their shareholders down? There has perhaps been a slow shift toward more protective licensing of their projects. Let's see how it goes. What I'd really like to see though, is a research effort that attempts understanding and building what we could actually call "intelligence".

Uses of ChatGPT

From an internet search, I figured ChatGPT could be used for: 

  • Coding: Debugging code, creating templates etc.
  • School work: Creative writing, etc.
  • Learning: Having ChatGPT teach how to code or learn a new human language.
  • Feedback: You can ask ChatGPT for its opinion on short stories and poems.
  • Brainstorming: Generating ideas for poems, stories or games.
  • Random questions: You'd have to verify the veracity of the answers though.
  • Daily tasks: Recipes, to-do lists, reminders.
  • Entertainment: For jokes, generating fictional stories.
  • Guide: It could be used for therapy or coaching. A doctor said that the response from ChatGPT was better than him, at pacifying the annoying relatives of a patient who was being treated.
  • Research: I found it useful to feed it my research paper and ask it to generate an abstract, title and conclusion which I later modified.
  • Companion: For some people, it's useful to just have someone to talk to. 

It's important to verify what ChatGPT generates. Lawyers already got into trouble for using ChatGPT, which generated imaginary cases. 

Let's hope the alternatives to ChatGPT offer some worthy competition too. There's Bard, Sparrow, ChatSonic, and more. There's an AI for a lot of things now. Even a website like tinywow which has free versions of various tools.


08 June 2023

When can we use spoken English as a programming language?

English has become unnecessarily complicated. Simplifying it will also help simplify AI training and daily use. What would you like to simplify about English?

Husbands across the world are familiar with how their wives use English or any other human language (or a broom) to “program” them into doing exactly what they want. The “code” in your mind is also getting re-programmed as you read this article. Such “dynamic syntax and semantics” which actually understands information and context, is ideally what we want computers to be capable of. Why aren’t programming language creators channeling efforts in this direction?

At my first computer class, our teacher said: “the computer is a dumb machine. It only does exactly what you tell it”. Although programs like Flappy Bird and GrootGPT have been built by prompting ChatGPT in English, and with GPT-4 generating websites using a diagram as a prompt, I do believe we are getting closer to being able to program computers by simply talking to them.

Don’t do the work. Make the computer do the work for you — Nav

The redundancy of memorizing syntax and semantics

Look at the various ways programmers had to learn and re-learn how to write a simple loop, because programming language creators decided to let their imagination go wild, instead of thinking about the end user:

  • Repeat 3[Forward 100 right 90]
  • for(int x = 0; x<=3; x++)
  • FOR i = 1 TO 3
  • for (let i = 0; i < a.length; i++)
  • for i := 1; i <= 3; i++
  • for x in data:
  • for a in 1..3 do
  • for i in {1..3}
  • for a = 3.0: -0.1: 0.0

As programmers gain experience, learning the wanton fluctuation in syntax and commands gets mentally exhausting. Creators of frameworks and programming languages really need to put in effort to provide simplicity and familiarity for the users. Either that, or build an AI to handle it.

It’s the same with conditional statements, classes and datastructures. In one language you learn the length of an array is array.length(). In another language it’s len(array). With for loops, what if we could just tell a computer to…

loop three times

…and the computer would understand it and automatically translate it to any high-level or low-level language we wish? The same applies to the unnecessary complexities of web frameworks. It’s mentally exhausting to be forced to learn all the nuances of PHP, then Struts2, then Spring framework and then realize that you also have to learn a different bunch of nuances of Django for a new project. Unfortunately, even new frameworks/languages like Julia and Modular’s Mojo are busy building a new syntax.

The future: Being able to talk to an IDE to do programming is just the first step. Improved versions will have us talking and interacting with (or even mind-controlling) not just a visualization of the final product on the screen (rather than deal with the code), but we’d be touching and interacting with what we create, via Virtual and Augmented Reality. Complexities and details will seamlessly be handled by an AI.

As programmers gain experience, learning the wanton fluctuation in syntax and commands can get mentally exhausting if one has to switch between languages multiple times. Creators of frameworks and programming languages really need to put in effort to provide simplicity and familiarity for the users. Either that, or build an AI to handle it.

The digital debt of repetitive manual tasks

As a full-stack developer, I’m fed up of manually having to start servers or write scripts to do it or setup manifest files and manually plan and test out the connectivity of disparate web technologies. Then there are the errors, compatibility issues and bugs that show up repeatedly which again require manual intervention. Then there’s the need to type and memorize commands like “kubectl run -i …” and also memorize which other parameters require a double dash “ — tty”.

These are all things that an AI assistant algorithm should be handling. Human intelligence and intervention is of course required, but a lot of the repetitive work can indeed be handled by an AI. This means massive cost savings not just in effort, but also in having reliable software (thus not losing time in debugging and also in not losing customers).

But we are too busy to build this, aren’t we?


Simplifying English as a first step

Haven’t you always wanted to just say “eye doctor” instead of having to spurt out “ophthalmologist”? Do we really need words like “yeet” when “throw” communicates it just fine? English is a language that borrowed from many other languages and grew massive with time. There’s a prominence of English used in programming languages, and it would help to simplify it.

Time: Was it really necessary to have 12am and 12pm? Isn’t 12:00hrs and 00:00hrs so much clearer in referring to day and night? Even clocks don’t need to have the pointless hour and minute hand where we are expected to do additional mental processing to interpret 6 as 30. It’s just silly!

Months & days: Couldn’t we have month names as Month1, Month2, instead of January, February? Couldn’t we have days of the week as Day1, Day2? I still find it hard to figure out what day of the week people are referring to in regional languages.

Planets: Mothers would be glad to not have their seating choices questioned, with mnemonics like My (Mercury ) Very (Venus) Elegant (Earth) Mother Just Sat Upon Nine Porcupines. Planets could simply be named Planet1, Planet2, and so on.

Spelling: Couldn’t we write words the way they are pronounced? “Kayos”, instead of “Chaos”, “Kernel” instead of “Colonel” (or just have military ranks as Rank1, Rank2A, …). Shorten unnecessarily long words like “Abbreviation” into “Abbr”? Get rid of the dots in “E.g.” and “etc.”.

I know it appears weird at first, but when you think about it, you’ll realize that we’ve just been conditioned into accepting and normalizing weird spellings and conventions.

English has become unnecessarily complicated. Simplifying it will also help simplify AI training and daily use. What would you like to simplify about English?

Reality of “AI” not being intelligent

“Intelligence” is still in the human brain. We haven’t really managed to make Generative AI or Artificial Neural Networks, truly intelligent. Using probability values to predict tokens is definitely not intelligence. When building GrootGPT, I noticed how ChatGPT didn’t actually understand what I meant by the left or right side of the page. It didn’t understand enough to modify the generated code to make the lightbox disappear when the User clicks outside the box. Colleagues have told me how ChatGPT would import imaginary packages in Python. Even though the results of current state-of-the-art of Machine Learning is impressive, the direction of research needs to be altered to build systems that are capable of independent logical analysis and adaptive learning. As few researchers have observed (and even I presented in my thesis), this requires allowing the AI to experience the world in the way we do. It is difficult to achieve, but I’m sure it is possible if people have the courage to break free from conventional thinking.

Communicating without errors with humans using English is tough in itself. An algorithm will need to take in a lot more context. Still, let’s see if it’s the open source community, academia, an independent researcher, or a corporate that builds the first truly intelligent algorithm. It should be incentivized. Although we have RPA, no-code frameworks and convention-over-configuration, we are still spending a lot of time and effort re-building and fixing things. This is not how life should be lived. We need to create more spare time to pursue our pleasures/interests and spend time with the people we love. To live, rather than just keep working long hours everyday! For a start, couldn’t we use existing tech to automate-away a lot of drab, monotonous tasks and build interfaces to command them with our voice? At least I’m going to try…

25 May 2023

Switching to Mint

I got fed up of the bugs in Ubuntu and switched to Mint. Here are some things I liked about it. 


  • Setting up the computer wizard. 
  • Snapshots.
  • Pinning and starring important folders.
  • Checking for drivers.
  • So many better backgrounds. 
  • Cool system sounds that are much better than Ubuntu. 
  • Setting up firewall graphically. 
  • Intro to software center. 
  • Showing how to contribute.
  • More detailed system info. 
  • Accessible crash reports.
  • Able to extend the duration of data in System Monitor.
  • None of the ugly pink color. 
  • Terminal fore and background is the right color.
  • Shows occupied disk space graphically. 
  • Easier to switch off system sounds and none of the annoying drumbeat. amplification.
  • No amazon bloatware.
  • No more notification messages that block the screen.
  • No desktop icons shifting positions and can paste to and from desktop.
  • Can easily adjust the positions and distances of icons.
  • Better workspaces.
  • Preview on icon hover from the taskbar.
  • Applets for the system tray.
  • Lesser loading time. Shutdown in fewer clicks.
  • Good ol' Ctrl+Alt+L for lock screen.
  • Really helpful community.

...and so much more! Linux Mint OS was built for the Desktop PC, and to keep the interests of the Users in mind.

02 May 2023

Finding work when companies and society have a poor support system

The recent mass layoffs at big-tech companies are  proof that one shouldn't link their emotions, loyalty or future to a company. It's important to be independent. With the advent of Artificial Intelligence (or rather, Machine Learning) algorithms, the redundancy of older jobs and the creation of new types of jobs are likely. 


However, life isn't all that simple. One can be injured and end up with a permanent disability, one could suffer a burnout that makes it difficult to work long hours, one could have aging parents or a family member who needs to be taken care of. These require a support system in society (helpful neighbours, friends and relatives) and a support system in the job market. 

This is one reason I created this list of freelance opportunities that people could use (click link).

 

Despite this, there are some things that people need to learn from a young age:
1. Become financially independent ASAP: Avoid pitfalls like loans, mortgages, pointlessly expensive holidays, expensive things, too many kids and financially draining relationships.
2. Network: Spend time in building not only good relationships that can get you jobs, but also building and enriching the freelance world where one can focus on bits of work and leisure at ones own convenience. Remember however, that networking isn't just about getting benefits for yourself. You need to provide value to your network too.


11 April 2023

Tips for building a PC yourself

It's 2023, and even now there's not a single website that provides all the necessary selectors or an AI which can help users identify, compare and select PC parts based on what has been successful in the market and based on which of those parts are actually in stock at retailers or wholesalers.

There are however some tools and tips I'd like to share, which can help newbies. My old Gigabyte motherboard (bought in 2012) stopped working recently for no apparent reason, when I resumed it from suspend mode. There were no POST beeps, and the CPU fan would twitch, but wouldn't start. 

If I rotated the fan by hand, it'd continue spinning on its own lazily. These problems probably started after an automatic BIOS update (which probably happened because of Windows 10 being present), and the motherboard's sudden stoppage appeared to be due to planned obsolescence. There are quite a lot of other people posting similar problems on Tom's Hardware forums. 

So the PC upgrade began with a new SMPS. 

Buying an SMPS/PSU

It is said that the length of warranty a manufacturer provides, is an indicator of the quality of components used in an SMPS. Check for overvoltage protection and short-circuit protection. There's no need of going more than 150W above your power needs. A bad PSU can erupt in fire.


On researching various available brands, these were some points I noticed from various reviews:

There are published lists of the quality/efficiency of PSU's:

You can verify the 80+ certification of a PSU (a lower wattage SMPS is more power-efficient when idle, so you can save electricity by getting the correct wattage instead of a higher 80+ rating):

There are websites that offer an SMPS power calculator (many may not be very accurate):

Observations from reviews:

  • Ant ESports: Said to be of cheap quality. Unstable voltage.
  • Antec: Reviews say it has bad customer support, missing cables, damaged cables, and the SMPS blew up for one person.
  • CoolerMaster: Not necessarily good, but may have some good models.
  • Corsair: Was said to be good earlier, but suspected to have cheap parts now, since more than one customer reported a sparking noise and for one person it failed in a year. The plugs are not meant for India (I don't understand why they can't supply a different plug), so you need an adapter. Said to have good customer support (which is handled by a franchisee in India).
  • Zebronics: It blew up for at least one person. Couldn't handle sustained load. The higher power SMPS actually had an 80+ certification.
  • Artis: One of the cheaper quality PSU's. A user had trouble waking from suspend. No fluctuation protection.
  • NZXT: Said to be good. Acro Engineering in Bangalore is the service centre franchisee. They were responsive. Comes with a ridiculously huge 16A power plug which won't fit into any of your 6A sockets. However, even their official customer support in Spain was helpful and responsive. They confirmed that for my power needs, I could use an old 6A power cord I had.
  • Asus: Good quality and good warranty. However the Bangalore service centre does not handle SMPS servicing.
  • EVGA: Said to be good and said to honour their warranty.
  • MSI: Could be good. Service centre was responsive, but background noise at the centre didn't allow me to confirm if they handled SMPS servicing.
  • Seasonic: Among the best. But expensive. One User said his SMPS failed within a year and he had to ship it to Kolkata to get it replaced. But the entire process of replacing it took just one week.
  • ThermalTake: Among the best. But prohibitively expensive.

Precautions:

  • Make sure you buy from a reputed brand that offers a 5+ year warranty (Seasonic and ASUS sometimes offer 6+ year warranties). A stable voltage supply, various power conservation features and part quality matter, when it comes to keeping your motherboard and peripherals safe.
  • For the wattage, seek out an SMPS whose wattage number is "continuous" (steady maintenance of that wattage) rather than "peak" (can reach that wattage only for short periods). 
  • A multi-rail SMPS is advised if there's high voltage fluctuation in your area. There are three basic rails: +3.3V (PCIe/AGP, chipset and some DIMM), +5V (PCI/AGP, low voltage motors, SIMM), and +12V (PCIe/AGP, high voltage regulators, motors). SB is Standby voltage.
  • See if it helps to plug the SMPS into a voltage stabilizer.
  • Understand and verify the documentation about the pin connections that are required for your motherboard. I remember a person who had to put his 600W PSU for sale online because he didn't check the number of power connections his motherboard required.
  • Check for the number of SATA power connectors and molex connectors.
  • PSU's like Seasonic and NZXT come with a 16A plug, which won't fit into any 6A sockets in your room. See the pic below (the service centre said it's ok to use a 6A power cord, and online reviews say that you shouldn't use a 6A adapter with a 16A cord, since the current and wire thickness difference can cause overheating). If you will be doing a lot of high performance computing, it'd be worth hiring an electrician to install a socket which can support the 16A plug. Don't take risks with electricity.

Buying RAM

Don't be tricked by the RAM frequency shown. For DDR4 RAM, the base frequency (the frequency it runs at during normal operation) it runs at is 800-1600MHz. The effective frequency (when you enable XMP in BIOS) is 1600-3200MHz.
 

Precautions:

  • Also, be aware of RAM latency. Check the CL number printed on the RAM.
  • Make sure the motherboard you choose, supports the RAM version and frequency.   

Some RAM brands:

  • Corsair (likely a good brand. Origin: Taiwan)
  • GSkill (probably a good brand. Origin: Taiwan). They were one of the first and probably only brands to ensure Rowhammer safety.
  • Crucial (probably good, but these usually have a higher CL number, so are likely to be slower, so don't go by just the price)
RAM usually works well for very long, unless overclocked frequently. So even if you can buy second-hand RAM, it's ok.
 

Buying a processor

I used to think that Intel processors were superior, but I was wrong. AMD seems to be manufacturing better processors. When selecting a processor, it helps to make a table containing the processor price, name, speed (normal/boost), socket type, L1/L2/L3 cache sizes, wattage (base/max), cores and threads per core, launch date, maximum RAM and maximum channels. The smaller the nm of the processor, the more transistors they can fit into a chip, and the more power efficient the processor will be. If you aren't into serious gaming, it also helps to have a processor with an integrated GPU (called APU).
To understand how defective CPU's are classified, watch this video
Note: People say that you need to change the thermal paste often. That's probably a myth like how dentists say you need to visit them every 6 months.

Buying a motherboard

Search for "motherboard nomenclature", and you'll see articles mentioning what the "Prime", "TUF", "ROG" etc. portions of the board name means. For example:
MSI PRO boards are lower quality compared to MSI MAG boards. The order is as follows, with the names on the left of the less than sign being worse quality.
  • PRO < MAG < MPG < MEG.
Same way, for ASUS boards it is:
  • Prime < TUF < ROGStrix < ROG.
The names mentioned above are the board series names. Strix E is the best. Strix F is the second best. Strix G is a Micro-ATX and Strix H is ATX. With motherboards designed for Intel chips, the G means it is GPU optimized, and S means it is storage optimized.
The Z790, B650 etc. are the chipset names.
The model names are P, Gaming, ProAX, etc.

Precautions:

  • Select the right chipset which matches the processor. Motherboard manufacturers usually publish a processor compatibility list.
  • If you choose a motherboard that does not support overclocking, you don't need to select a processor that supports overclocking (unless you plan to switch the processor to a different motherboard later).
  • The boards with WiFi are generally not worth the extra money unless you will actually use WiFi and Bluetooth. The alternative is to buy a separate WiFi card when you need one.
  • Go to the official motherboard specifications page and ensure it has all features you need. These include NVMe, PCIe, onboard speaker, USB ports, display ports, LAN, audio and PS2 port if you ever need it.
  • Have a look at the number of pins required for the CPU power, and ensure that your SMPS provides it. 8 pins is the standard, but some have a second optional power connector with 4 pins for people who want to overclock.
  • Check for XMP support (also called AMP, EOCP or DOCP).
  • LED boot lights are helpful.
  • Check if the processor has integrated graphics. Also called APU for AMD processor. These are CPU's with GPU's built in. Some can be so powerful, that you won't need an extra graphics card. For example, the Ryzen 5 5600G has an APU that's equivalent to an NVIDIA GT 1030.
  • Check for warranty duration and service. 
  • Check for whether they have a history of stable BIOS updates.
  • Check for BIOS flashing and BIOS reset options. 
  • Be aware of the DPC and R terms.
  • Look through reviews and posts on forums for complaints about particular motherboards.

Customer support

This is an essential part of selecting a product. The customer service centers should ideally be in your city, else you'll have to ship it to another city. Before buying the product, it also helps to call up their customer support number or email, and ask some question to see how they answer it.
  • ASUS: Said to have good service. Their Bangalore customer support is handled by F1 Infosolutions at Cunningham road.
  • MSI: Bangalore customer service at F1 Infosolutions, Kalyan Nagar. They said they'd probably have to send the motherboard to Delhi for inspection. Their website has a page for registering the product.
  • ASRock: Bangalore customer service at Smartlink network systems, Jayanagar.
  • Coolermaster and Crucial: Bangalore customer service at Kaizen Infoserve at NR road, near Majestic. 
  • Gigabyte: Service center is in Chennai.
  • NZXT: Bangalore customer service is at Acro engineering, near Lalbagh. The service person was responsive and helpful.

Useful sites

Building the PC

  • Do not keep the motherboard on the anti-static bags. It is made of conducting material. You can however keep it on cardboard that has no print on it. 
  • When tightening or removing the screws of the cooler, remove the screws diagonal to each other first. If you remove the screws adjacent to each other, the spring action can make the cooler whip outward, possibly ripping the processor out and damaging the pins.
  • Before removing the cooler, run the CPU for a while to get it hot. This will make the thermal paste a bit more fluid.
  • It's ok to have XMP enabled for the RAM in the BIOS. But it's also necessary to run Memtest for a few passes to check if the RAM is functioning right, because if the RAM isn't at the right frequency, it'll cause the PC to crash at random points of time. Even if Memtest passes during the first pass, it can detect RAM failure during the next pass. So make sure you let it run for at least 3 passes. If it detects errors, you can go back to the BIOS and lower the RAM frequency and run Memtest again. Do this until the tests pass, and that's the stable frequency you can settle for.

HDD vs. SSD

Definitely buy an SSD instead of an HDD. If you have an old HDD, then install your operating systems on the SSD and attach the HDD as a secondary backup storage. There are options like NVME/SATA/M2 that you can consider.

DVD/BluRay writer

If buying any of these, buy one that can be connected to the PC via USB, because then it allows you to connect it to a laptop or any other computer easily.

Selecting a UPS

There's the ordinary "Online UPS", the "Line interactive UPS" and "Standby UPS". Choose carefully, based on your voltage stability needs.

Pre-built configurations

The shops selling PC parts may also have some pre-built configurations that you can choose if you don't want to go through the hassle of choosing parts. There are also plenty of PC building online forums where you can ask for advice, you can post your proposed PC configuration and ask if it's good enough. There are websites where you can check if the parts you are buying are good enough for the games you plan to play.
 

Final tips

  • Don't be in a hurry to buy. Plan it out well, and based on exactly what your needs are.
  • Buy more RAM and storage space than what you estimate you'd need. It's always worth it. 
  • Buy a large computer cabinet. It helps when you want to install a large modern graphics card even if you may install it only later. 
  • Think of what other accessories you'd want. A mousepad with good grip would be good. A computer cover isn't really necessary since it's simpler to cover the computer with a table cloth.
  • Do your research about mechanical keyboards and try buying one of those (there's a difference between the ones which internally have blue, red and brown keys). Search for the ones that have Cherry MX keys instead of the cheaper Chinese alternatives. Also look for ergonomic keyboards. If buying a membrane keyboard, the quality of Microsoft keyboards may be a lot better than others.
  • Check if you really need an extra graphics card or whether an APU (integrated GPU) is sufficient. You always have the option of buying a graphics card later if you really need it. 
  • Search for computer cabinets that may have an extra slot for inserting SD cards. Also, test every slot of the cabinet before bringing it home. Once I got a cabinet where the front mic and speaker connectors didn't work. 
  • Since dust may enter computer cabinets, there are certain kinds of filters that can prevent dust from entering. I'm not sure if it is useful. A few searches and asking around on forums can help you figure it out. 
  • Search other websites for anyone planning to sell off their computer. Some people try selling it off just because they are leaving the city, so if the person is reliable you may get a good PC and it gives you a great chance to bargain.
  • When going to places like SP road, first ask around in multiple shops for prices. The shops will generally give you a quotation for each part you want to purchase. Search online for which shops are good, and go to those shops. Going to good shops matters a lot so that you don't get cheated, and if there are any issues, the response of the shop owners matters. Decent owners will be helpful. Shady ones will tell you to get lost. I have had trouble with defective/fake items from unreliable shops.
  • Ask your friends if they also plan to buy something. First talk to the shopkeeper saying that only you plan to buy, and ask if he could give any discounts. Then ask how much more of a discount he could give if you ask your friends also to purchase from his shop. Try strategies like these to get a good bargain. Ask an AI to give you more tips.
  • At SP road, some shops do the PC assembly at the shop itself, and some of them outsource the assembly (done for free) to another shop. The other shop is usually a cramped up messy place where the assembly is done in a very amateurish way, so make sure you insist that the assembly be done at a safe place.
  • Ask the shopkeeper if there's any advantage in getting the PC assembled at their place and if there's any discount if you choose to do the assembly yourself. Also, whether they'd replace the parts then and there if found to be defective during assembly.
  • You could take the parts home and try building the PC yourself, but I'd recommend having some experienced person guide you. 
  • It's always better to buy a PC instead of a laptop, because you get much more performance for the money you spend. If mobility really matters, it's usually better to spend lesser to buy a tablet or one of those tiny laptops which have no fan requirement. Any heavy processing can be done on the cloud. 
  • Go to the shop well prepared, and with all necessary technical terms in your mind. If people see that you don't know your stuff, they are more likely to charge higher or trick you. 
 
Remember: When you pay for something you have the right to get it done the way you want.
 
All the best with building your PC!!!

05 April 2023

How volunteering should be done

Many years ago, I led a team of volunteers for what is usually called a CSR activity, but in our case it was just called Employee Volunteering, or Community Relations.

I noticed a trend among corporates and employees, to volunteer for social causes without really caring about improving the situation of the people they purported to help. Everyone just wanted to show that they were helping. The photos and entertainment was more important than empathy, caring and finding solutions.

I also noticed a pattern of people being forced to volunteer and then not wanting to return back to volunteering at all. Almost eight years ago, I had created this infographic to illustrate the problem to my seniors.

How volunteering is done by many

If you point out a problem, you should also offer a solution. So the next infographic shows one solution.

A better way to volunteer

A crucial part of the "better way", is the mentoring phase. Volunteers first need to be taught how to volunteer. In every sector, there are experts who know what the key problems are and how it needs to be addressed. They need your help, and they need it in specific ways. Don't use it as a chance to entertain your employees. Use it as a chance to actually help. It may be boring to do meaningful volunteering. But that's what really helps. 

The Nav test can provide some more guidance.