02 February 2025

Free GenAI text to image generators that can be used commercially

I wanted to generate some images using AI, and wanted to find out which ones were completely free to use for commercial purposes. Various such tools obviously had all kinds of tools to customise the image, but for a trial, I tried a simple prompt only.
 
Disclaimer: These were based on a cursory survey. Please double check the terms of use and any other conditions imposed by all the websites. I am not liable for any errors.

Prompt used

"A comic strip of a hero named izak who suffered chronic eye strain and recovered and is now trying to save the world from the evil villains who trap children and adults with eye strain, spectacles, eye tests, lasik and eye drops by making them addicted to games, TV, smartphones and by making them work long hours in office in front of computers."

Note: the word "trap" was earlier "enslave", but Blogger's keyword filters blocked this from being published and then I had to appeal for a review and then it got published. I've faced similar irritating keyword filter issues with some websites where I tried generating images, which shows an unfortunate reality that even websites that use generative AI, are not using generative AI to evaluate prompts.

Copyrights issue

The copyright for using AI-generated images is a complex legal issue that has not been fully resolved in many jurisdictions. In general, the copyright for an AI-generated image is likely to be owned by the person or organization that created the underlying AI algorithm or data set that was used to generate the image. However, if the AI algorithm was trained on copyrighted images or other materials, then there may be copyright issues related to the use of the AI-generated image. Perhaps projects like H20AI may be free of copyright issues.

The websites below are randomly ordered.

OpenArt

Openart.ai has image to prompt too. Their style palettes are amazing. They have a 7 day free trial with 40 credits. The generated images can be used commercially with credit being mentioned. You can fine tune the model with a model type and uploaded images. They also have various apps for facial expression changes, changing parts of images in various ways, changing styles of objects in images and more. It didn't understand that I wanted a comic strip in Pixar style.

It did a poor job of understanding my prompt of "change the spectacles to rimless" which I did after selecting the inpaint area tool. With better prompts I guess things might be better.


Deep AI

I think this is supposed to be free forever. The image generated was not bad at all, though it didn't understand that I wanted a comic strip. It didn't even need me to login to generate this. They also have an AI video generator and chat. As per the terms of use, the generated images are free of copyright and can be used commercially.



StableDiffusionWeb

This was the first one that created a proper comic strip, but the words were gibberish and the spectacles on the characters was weird. The free plan allows 10 credits per day. Images created through Stable Diffusion Online are fully open source, explicitly falling under the CC0 1.0 Universal Public Domain Dedication. They even have a Prompt Database. It added a watermark though at the bottom right.


Playground

They allow 15 free images every 3 hours and images can be used commercially. Rather than being for general image creation, they allow Logos, Art, Stickers, Wallpapers, Posters, T-shirts, Monograms, E-book Covers, Cards, Invites, Patterns, Mockups, Memes and more. It did a decent job.

 

Freepik

I liked Freepik. It's a Spanish company whose website is well thought through and intuitive to use. They have a host of tools to use, like retouching, background removal, re-imagining, mockup generator, image editor, upscaling, video generation and more. They have various free limits for stock images, AI tools (20 images per day for generating images), and more limits for other tools. You can use AI-generated images for personal or professional purposes, including commercial projects, provided they comply with applicable laws and respect third-party rights, such as identity, creative ownership, trademarks, and intellectual property. However, it is your responsibility to ensure the images do not infringe any third-party rights and comply with the applicable regulations. Their terms of use are here.


Ideogram

They have website which takes long to load any page initially, but the free plan has 10 credits, where each credit generates 4 images. The results were pretty good. They do not claim any ownership rights in your User Input or User Output, and they do not restrict your ability to use User Output for your own purposes (including for commercial purposes). Ideogram seems to be built by a good team.

 

Starry AI

They give 5 free credits daily and generated images can be used commercially. They had a reasonably good website too. It allows uploading more photos to train it to a certain style. The generated image was too basic though, and didn't form a cartoon strip.

ComicsMakerAI

They give 100 free credits per month. Generated images can be used commercially. They created a nice process where you can create characters using a prompt, create a scene with another prompt, create a background with another prompt and then there's a pose editing tool to adjust the pose of the character. But when the character didn't conform to the pose I created, I realized that such tools have a long way to go before being usable.


Generate images on your own computer for free


Generate images with your code and HuggingFace's servers


Other text to image generators with limitations

Flux AI

Did a poor job with generating the cartoon hand and the "I" in Izak. There were plenty of other errors in the image. They offered only one free credit. Didn't like it.


Flux AI.art

At least this LLM understood that it was supposed to generate a comic strip. Here you can use Flux.1 by allowing experimentation for free, but they retain the copyright. They also have a table comparing Flux1, midjourney, Dall-E and SD3-ultra.

Stabledifffusion

With an extra "f" in the name, this offers free image generation and seemed to understand that a comic was required. This is generated on a UK server and didn't mention anything about commercial use, so I assume it does not allow commercial use.


Leonardo AI

They provide 150 tokens free everyday, but I found it extremely irritating to use because when I typed the prompt, it showed "Error. Phrase blocked". It didn't even show me what phrase was blocked. I tried altering the prompt using the prompt generator and it still didn't work. The engineers working here seemed careless. I promptly deleted my account.

Midjourney

Subscriptions start at $10 per month, so no free generations. 

Dall E

This can be tried in ChatGPT itself, but even this did not generate the image because it apparently didn't align with their content policy. Another dumb implementation of security.

Stability AI

Has only a free trial, but no free credits, so didn't try it. 

Rendernet

This website produces amazingly detailed images and videos, but has no free plan.

GetImg

They give 100 free credits free per month, but no commercial usage rights for the free plan.

FluxAI image generator

They give 100 credits, 5 per day, and no commercial usage rights for the free plan.

Bing image generator

Provides 25 credits and does not claim ownership of generated content, but says nothing about commercial use, which means it cannot be used commercially. They did a somewhat good job of generating a comic, but all with superman instead of a unique superhero.

Canva

Canva's dream lab was so far the best. They offer 25 free generations in total and it can be used commercially, but under their terms. So not really a great option for free image generation.


Lexica

Has only paid plans.

Wonder

Has only 5 free credits and very few controls, but good generation capability, although it didn't understand I wanted a comic strip.


Hamster AI

They have a surprisingly high number of free credits. Without signing up itself there are 5 credits. With a signup, there are 250 free credits per month. They advertise themselves as being among the most cost effective AI website and offer more tools for chat, searching the web, etc. Nothing was mentioned about commercial usage of the free images.


Channel AI

They needed an app install on the phone and the free generation was only for limited time, so skipped this.

Photoleap

This appeared to mainly be for photo editing, and had only a free trial, so skipped it.

AnimeBG

This seemed fine tuned for anime images only, so skipped it.

DesktopHut

This was a poorly constructed website with good controls for AI generation. The image generation seems free, but they seem to have restrictions on copyright.


Pictrain

They seem to be particular about copyright, so didn't proceed. This service seems particular about being able to generate art in the style you specify.

Mage Space

Was not to happy with the website and the generation. They initially showed 10 free credits and then with the generation of the first image, it said "You've reached the end".


Scenario AI

They don't have a free plan.

Minimax ai

This turned out to be for free (for the time being) video generation, but it comes with a watermark even though people are allowed to use the videos commercially.

ImagineArt

They offer 1000 free credits for 3 days for video generation. They have image to video and text to video. Once a generation began there didn't seem to be any way to cancel it, which I found silly. The website layout was also poorly thought through. It's for non commercial use only. It generated a 1280x720 sized video of 5 second length which was 6.1MB in size. Poor job on video compression.


Splashing

A poorly generated cartoon, but in a good comic strip fashion. Generation is free, but for commercial use you need to pay. Seemed ameteurish.

Adobe firefly

Has 25 free credits per month and generations can use for commercial purposes, but their poorly engineered keyword checks didn't allow my prompt.

HuggingFace

As weird as the name sounds, they do have some good options for running LLM's.

This page allows generation of images, but has some of those useless keyword checks which didn't allow my prompt to go through.



01 January 2025

The Context of why Health is Wealth

Wealth is not always money or property. I came across an explanation that wealth is what you value the most in your life and gives you happiness. For some people, having a loving partner and a caring network of people is their wealth. So even if they are poor, they are still happy. For some people, what matters most is their peace of mind. So if they can avoid marriage, kids and the chaos of interacting with people and live a quiet life with peace of mind, that’s their wealth. For some people, wealth is their intellectual accomplishments in life. Their research publications, awards, books authored, or other achievements. For some people, wealth is the fulfillment they get in being able to help others (or helping Nature) and uplifting others. Many other people have other aspects they consider their wealth. I’d like to hear what yours is, in the comments.

Treasure your good health. Photo source: pexels-olia-danilevich


Health is the greatest Wealth


No matter what anybody’s choice of wealth is, health is the one wealth that trumps all of them. Many of us are lucky to be born with a treasure chest full of good health wealth. As time passes by, we unknowingly squander our health wealth in various ways (to avoid squandering the wealth of your eyes, please do read The Real Cure for Eye Strain). Everything in life is a lot more bearable, and we have a better chance of earning all other types of wealth when we have good physical and mental health. Don’t let anyone or anything steal your health.

Health Wealth Thieves


  • Sleep disruptors: Anything or anyone who disrupts your sleep is stealing your health wealth. It could be loud noises while you sleep, badly cooked food, expectations of losing sleep to achieve something or someone who wakes you up unnecessarily. Sleep loss can wreck havoc on your entire body. Don’t allow your sleep to be stolen.
  • Incompetent/evil employers: Many employers/managers ruin our health by expecting long working hours, simply because they are incompetent in being able to estimate timelines or capabilities. Many are deliberately evil, when coercing people to give up their personal lives to toil for the company and suffer a burnout. Don’t let such evil thieves steal your health permanently. Chronic repetitive stress injuries can leave you a pauper in terms of health wealth.
  • Laziness: Not exercising regularly is a great way to lose health wealth. There are many exercises which can be done with your own body weight. Some intense exercises can be done in just seven minutes. Take time to exercise everyday and to ensure you get a well balanced diet of properly cooked food.
  • Corrupt people: It takes a great deal of stupidity for corrupt people to allow our environment and food to get polluted, when it was entirely possible to prevent it. Then there are unnecessary wars started, which permanently steals people’s health. Don’t forget the evil people who adulterate foods. Corruption affects not only the health of the people engaging in corruption, it also affects their own family and everyone else. Why is this even being tolerated? Why can’t we have intelligent people running the world?
  • Nature: Bacteria, viruses, lightning strikes, accidents, attacks by wild animals, genetic anomalies and more. Even Nature steals our health sometimes.
  • Ignorance: Not knowing which foods to avoid, not knowing how to cook properly, superstitions and ignorance of various phenomena can steal our health.
  • Toxic people: Protect your mental health by avoiding them and/or helping them seek therapy.


Thankfully we have researchers, doctors, nurses, health equipment manufacturers, our immune systems and various other “health police” who rescue us from health thieves. I’m grateful for these good guys in our lives.

Wishing you a healthy, wealthy life!

25 December 2024

It is almost time to code in spoken English, but not yet time to architect in spoken English

There is a bit of history about how English became the most prominent language for programming. However, the wanton variations in programming language syntax and the poor manner in which various software frameworks are built, makes one wish for being able to do build software using spoken English.

Models are still unable to visualize and understand what we want it to do

Recently I tried building a simple chatbot using ChatGPT to generate all the code for me. During that effort, I noticed how the LLM (ChatGPT) did not actually understand what I meant by the left side or right side of the page. Also, when it re-generated code based on corrections I asked it to do, it would re-generate even older errors which I had corrected a few prompts earlier. This showed a critical flaw in the use of LLM's for coding. The LLM is unable to visualize what we want it to do. Even though ChatGPT-4o has got much better at code generation, these issues continue to plague even modern models.

Techniques being used to build better AI copilots

From Andrew Ng's "The Batch" newsletter, I came across the information about the techniques used: 

  • Chain of thought (the model is made to think step by step)
  • Self-consistency (the model generates many responses and picks the one that's more consistent with the other responses)
  • ReAct (reasoning and action steps are interleaved to achieve the task)
  • Self-refine (the agent reflects on its own output)
  • Reflexion (allows a model to act, reflect, evaluate and repeat)
  • Test time compute (increases the amount of processing power allotted to inference)

Coding assistants

WindSurf IDE's CoPilot

I recently tried using extensions which either connected to LLM's on a server or used a local LLM via Ollama. Today, there are better options:

1. Cursor: It promises to keep code private. I'm yet to try it, but it has a free version for limited use, so I'm likely to try it, although a bit reluctant since it needs me to download their IDE. However, I'm always skeptical about privacy, because many of these websites which make tall claims of keeping data private and encrypted, actually might have lax security, as muah.ai users found out recently.

2. WindSurf This is an IDE based on VS Code which you need to download and setup to make it automatically connect to their server. I tried this and found to be reasonably good. There are some glaring usability issues related to using undo on the generated changes, but in terms of what it provides, there are actions (perhaps self-refine or reflexion) it does to make changes to the code and see if it makes sense and then it automatically re-attempts changes until it gets to what it thinks is correct. With prompts where you give it many instructions, it tends to really mess up the code. Anyway, having to use a separate IDE is a no-go for me, so I'll be uninstalling it soon. Since it can be used to prompt the LLM to access my filesystem, my trust in it is even lesser now (possibility of hacks).

3. Supermaven: Not yet used this, but since it's an extension which works with VS Code, NeoVIM and JetBrains, it's better placed than options like WindSurf, and has a free tier too, which might not be as restrictive in terms of how long you can use it. Their 7 day data retention policy was also a relief.

4. GitHub CoPilot: I'm more likely to try this since it does not need me to install a separate IDE, and now they have a free plan too.

5. ChatGPT's canvas: When you first generate code in ChatGPT, it switches to a canvas mode where you can do more edits. As of today it's useless, since it ended up replacing my HTML code entirely with JavaScript when I prompted it to make some small changes.

6. Sourcegraph: Their unlimited free autocomplete was the first thing I noticed. Might try it later.

7. Amazon Q: Has not only a free option, it also has plugins for Eclipse, VS Code and Jetbrains.

8. Double: This has only a 30 day free version, but seems to have some features that rival GitHub Copilot.

9. Gemini in IDX: I'm not surprised not many people are talking about this. It's in beta stage now. It's basically VS Code in your browser, and activate Gemini coding assistant or install any other extension as a CoPilot. Since it's in beta it's not working fully yet. Once it works, it might be far better to use than VS Code or Android Studio.

10. Tabnine: They seem to have even integration with Jira built in, which is a cool feature. Only 30 days for a free trial though. They support a lot more IDE's like Jetbrains, Eclipse, VS Code, NeoVIM, and more.

There are a few other stray examples like PotPie, Pieces, a PR agent, copilot.live and Tabby. So far, comments on Reddit don't seem to be too happy with GitHub Copilot, but they seem to like SuperMaven, WindSurf and Cursor. There's more coming, with agentic software like Devin, De and LangGraph studio

To pay or not to pay

From what I've seen so far, it'll take some time for LLM's to be able to become capable enough to design an overall architecture and plan for efficiency of code reuse. So programmers really need to know their concepts of the framework and the language well to be able to build reliable software. Due to this, I believe it's not yet worth it (at least for me) to pay for these services. It's more than enough for me to design the architecture myself and prompt the free LLM's only when I need it to generate any code. But that being said, these coding assistants are truly effective at slicing down development time of a few weeks or months, to a matter of minutes or hours. All that drudgery of figuring out errors and their solutions, and finding better or alternate ways of doing things are getting done so much faster with the LLM.

On a side note

I wonder how well LLM's will adapt to people who prompt it with grammatical mistakes in their English. Although this also means that now people will be able to chat or prompt LLM's in their native language, and the LLM will actually be able to generate code using non-English languages. I still feel we are only scratching the surface of how software will be built in the future. There are already people trying to get rid of API's. I'd like to see a future where we plug in our minds to a computer and simply think to generate software solutions from what we imagine.

29 November 2024

Dealing with disruptive volunteers

This content is originally from this page, which appears to be Southern Rural Development Center's website.  The content became unavailable recently, and since it was part of my Nav test for volunteers, I decided to locate the content again and found it here. I'm posting the content on my blog now for easy reference:

 

TERMINATE OR TOLERATE?
Dealing With a Problem Volunteer


One of the most disturbing aspects of managing volunteer programs is the unfortunate incidence of volunteers who become problems. Often the circumstances surrounding these situations are founded in the volunteer. On the other hand, many of the situations are preventable with good volunteer management practices. The good news is that firing a volunteer is possible. While firing is not appropriate for dealing with the often annoying volunteer or even the seriously disruptive volunteer, it is appropriate for dysfunctional volunteers.

This paper will discuss when termination is needed, what supervisory details need to be addressed and issues to consider related to impact of termination. The advisory leader role will be used in examples because they are perhaps the most distinguished and influential volunteers in the Extension system. The principles and practices however, apply to any volunteer role or volunteer at any level in the organization.

In Extension we are prone to be grateful to any volunteer who walks into the office wanting to help. We are so problem oriented, we tend to think we can fix any problem. Not always true. McCurley and Vineyard, 1998, offer the following myths:

Myths about Problem Volunteers

1. If I ignore the problem it will go away: The problem volunteer may recede from the limelight, but will still be lurking and possibly be harder to identify at a later time.
2. No one else notices: Particularly, the complaining volunteer will be noticed. No need to be a martyr when it does not help the situation.
3. I can fix a dysfunctional person: This is not in the volunteer manager’s job description and other volunteers will eventually resent the time and energy drain taken from their legitimate issues.
4. There’s good in everyone…we just need to give them time to show it: Unfortunately, it must be acknowledged that there are evil, nasty people who enjoy causing others to be hurt. Allowing them to continue is harmful to the program.
5. A confrontation will make things worse. They might get mad: The best interest of the program is the first consideration. The volunteer manager has
to maintain control.
6. A confrontation might result in the volunteer leaving and if they do, the program will fall apart: If this is true, deeper problems than the one problem volunteer exist.
7. If I’m a truly caring person, I can handle all the people who are problems: Volunteer managers do not have to be “saints”. All the feel-good people cannot solve problems caused by mean-spirited people.
8. Everyone wants to be fixed: Not true. Some people enjoy the attention they get or watching the chaos they create. The myths address “problem volunteers” who need to be dealt with but not necessarily “fired”. There are books written about various strategies to handle the confrontational volunteer, the whining volunteer, the “bully” volunteer and others. 

This paper will not address this large group of problems. What it will address are the valid reasons to “fire” a volunteer. There are three reasons that are supported in the literature:

1. Competency Issues

Unfortunately, there are instances when orientation and competency-based training over time still fail to help a volunteer perform the role acceptably. Another possibility McCurley, 1996, refers to is motivation. Is the volunteer able, but just not motivated? Or is he motivated, but unskilled. In some cases, volunteers outgrow the job they are in, and do not want someone else doing the job. An example is an advisory leader who did not come to meetings for two years, but when a new member joined the council, he staked out his geographic territory in no uncertain terms. In such cases, volunteers fill a space that needs to be occupied by an active volunteer.

With competency issues, the volunteer manager must do orientation training and other needed training. It is not enough to just offer training either. Documentation of the volunteer’s attendance at orientation and competency training is critical evidence the volunteer manager may need to produce. Volunteers may have either rejected training opportunities or something in their personal situation may have impacted performance on the job.

2. Fulfillment of Role Issues

When the volunteer goes beyond the role they have been given, there may be justification for firing. Examples include volunteers who do things they are not authorized to do. In these cases, while they may mean no harm, if they are not properly trained, they can absolutely do harm. Examples include the advisory leader who meddles in faculty personnel issues, or the leader who represents Extension inappropriately with community groups.

With these issues, the job description and more specifically, the position description is a key management tool. The job description should be discussed in orientation training with the new volunteer. A good way to confirm their understanding of the role is to modify the job description to create a position description for each volunteer which they sign at the conclusion of the session. The job description should outline the goals, objectives, and performance measures of the job.

3. Behavior Issues

Even the best application and screening processes can fail to detect someone who for whatever reason, makes poor judgement decisions relative to personal actions. The volunteer who suddenly becomes abusive, disrespectful of authority, or hostile may be having personal issues to deal with that have nothing to do with the volunteer job. These volunteers can be harmful to the program and to individuals in the program. In some of these type situations the volunteer may be acting different from their normal pattern. Sometimes these type behaviors become normal over time and they may be intentional. The best management practice in these situations is documentation and dealing with incidents as they occur. For some of these situations, termination is the best alternative for the good of the program.

Supervisory Responsibilities

Terminating volunteers is possible, but should probably be employed only if the situation is very detrimental to the organization and after all other alternatives have been explored.

Consider the following options:

• Re-assigning to another volunteer role. For example, they may perform well in a different program area or on a program committee rather than the overall council level.
• Referring to another agency or organization.
• Recognize and retire them from the volunteer role.
• Insist on re-charge time when they are rotated out of their position for a specified period of time.

In county Extension programs, the County Director is ultimately responsible for making sure faculty utilize best volunteer management practices. Appendix A is a Scenario of a Volunteer Dismissal. McCurley and Lynch, 1996, suggest that volunteer managers develop a system for making firing decisions. Elements of a good system include:

1. Forewarning / notice

• Personnel policies regarding employment of volunteers including probation, suspension, and termination.
• A volunteer application and screening process and operating procedures to guide informing new volunteers about policies.
• A job description and mechanism for explaining the job requirements and unacceptable behavior. Orientation and competency based training with documentation of attendance is important.

2. Investigation / determination

• Having a clearly defined process for conducting a fair investigation.
• Being consistent with policies of the Personnel Department of the organization.

3. Application

• Follow-through on enforcing the system.
• Treat all volunteers equitably.
• Providing a peer-review mechanism so decisions are not personal.

Impacts of Firing Decisions

Dealing with problem volunteers is time consuming, emotionally draining, and potentially detrimental to the program. McCurley and Lynch, 1996 note two benefits of having a firing system in place:


1. The right decision is more likely to be made.
2. A case for the termination is developed. This can help diffuse negative impact in the community or even externally. Often, the volunteer will decide voluntarily to resign rather than face the inevitable.


In terms of replacing advisory leaders on an advisory council, there is a Checklist of Questions attached in Appendix B. This checklist addresses additional volunteer management practices that are fundamental. Appendix C offers Strategies to Re-Staff an Advisory Council. It is not uncommon for a new County Director to inherit an Advisory Council that is predominately Extension “family, older volunteers with a traditional view of Extension programs, and a few influential members who do not come to meetings. Starting completely over is desirable, but not always possible considering the political nature of most counties.

Summary of Best Management Practices

While firing a volunteer is not easy or pleasant, it can be done. Better yet, is to use the best volunteer management practices referenced in this paper. They are:
• Develop a system for handling problem volunteers.
• Use clearly written job descriptions.
• Use orientation training to detail the job description and the processes for removal.
• Conduct competency based training.
• Have group operating procedures that specify member expectations.
• Provide volunteers with evaluation and regular feedback on performance.

References:

  • Lee, Frances Jarene with Julia M. Catagnus. 1999. What we learned (the hard way) about supervising volunteers: an action guide for making your job easier. Energize, Inc.,
  • Philadelphia, PA. McCurley, Steve and Rick Lynch. 1996. Volunteer management: mobilizing all the resources of the community. Heritage Arts Publishing, Downers Grove, IL., pp. 105-110.
  • McCurley, Steve and Sue Vineyard. 1998. Handling problem volunteers. Heritage Arts Publishing, Downers Grove, IL pp. 41-52.

28 November 2024

Securely restoring and erasing data from different types of storage media

Ever wondered why it takes time to copy a large file from one disk to another disk, but deleting the file takes a fraction of a second? That's because the file isn't really getting deleted. Only it's address is being erased. The actual file is still there on the disk, and there are software which can recover the file by identifying the sectors on the disk that the data is stored in, even if the data is not contiguous (stored in sectors that are one after another). This is why, even when a disk has no partitions and you think there is no data on it, the files that are there on the disk can still be recovered. The storage of data on SSD's or pen drives or your phone's storage works a bit differently from how data is stored on magnetic disks like the HDD. To know more about how long data can be retained on each type of disk and how data gets corrupted and how it can be recovered, read on...


1. Magnetic Hard Disk Drives (HDDs)

Technology and Material:

HDDs use magnetic storage to record data. A spinning disk coated with a magnetic material (typically iron oxide or cobalt alloys) is used to store data in binary format. Read/write heads move over the disk to magnetize tiny areas, corresponding to data.

Data Persistence:

Data on HDDs can last anywhere from 3 to 10 years depending on the quality of the drive and storage conditions. Environmental factors such as heat and humidity can reduce the lifespan of the drive. So if sectors on the disk lose their magnetism, data can get corrupted. It helps to copy fresh data onto the disk or overwrite the disk with random numbers and then freshly re-copy your data onto the disk every 3 to 5 years.

Factors That Can Corrupt Data:

  • Physical shock or damage
  • Power surges
  • Magnetic fields
  • Mechanical wear (moving parts failure)

Data Recovery Tools:

  • Windows:
    • CHKDSK (Command Line): chkdsk X: /f
    • Recuva (GUI Tool for recovery)
  • Linux:
    • TestDisk and PhotoRec (Command Line): sudo testdisk
    • PhotoRec (Command Line for recovery of lost files)
  • Mac:
    • Disk Utility (GUI)
    • PhotoRec (Command Line)

Secure Deletion Tools:

  • Windows:
    • SDelete (Command Line): sdelete -p 3 X:
  • Linux:
    • Shred (Command Line): shred -u X
  • Mac:
    • srm (Command Line): srm -v X

Common Assumptions About Deletion:

Many people assume that simply deleting files from an HDD removes them permanently. In reality, deleted files are often recoverable until they are overwritten by new data.


2. Solid State Drives (SSDs)

Technology and Material:

SSDs use NAND flash memory, a non-volatile memory type that stores data in floating-gate transistors. Data is stored in blocks, which are electrically erased and rewritten.

Data Persistence:

The data on SSDs can last 5 to 10 years, but it depends on the number of write/erase cycles the cells go through. SSDs can wear out over time due to this limitation, often referred to as write endurance.

Factors That Can Corrupt Data:

  • Excessive write/erase cycles
  • Power failures during write operations
  • Physical damage (e.g., exposure to heat or static electricity)

Data Recovery Tools:

  • Windows:
    • Recuva (GUI tool)
  • Linux:
    • ddrescue (Command Line): sudo ddrescue /dev/sdX /path/to/backup.img
    • TestDisk and PhotoRec
  • Mac:
    • Disk Drill (GUI)
    • PhotoRec (Command Line)

Secure Deletion Tools:

  • Windows:
    • SDelete (Command Line)
  • Linux:
    • blkdiscard (Command Line): sudo blkdiscard /dev/sdX
  • Mac:
    • diskutil secureErase (Command Line): diskutil secureErase freespace 0 /Volumes/DriveName

Common Assumptions About Deletion:

SSD users often believe that wiping the data using conventional methods like formatting or deleting files ensures security. However, because of the wear leveling algorithm, deleted data can still be accessible, requiring specialized tools like blkdiscard for secure erasure. Even overwriting a file with the same filename, won't overwrite data on the same location. Remember that.


3. USB Flash Drives / Pen Drives

Technology and Material:

Pen drives use NAND flash memory (similar to SSDs). Data is stored in arrays of transistors, and the device is accessed via a USB interface.

Data Persistence:

Data on flash drives can last from 5 to 10 years, depending on usage. Like SSDs, repeated write/erase cycles can degrade their lifespan.

Factors That Can Corrupt Data:

  • Physical damage
  • Power surges or interruptions during writing
  • Data corruption due to improper ejection

Data Recovery Tools:

  • Windows:
    • Recuva (GUI)
    • DiskPart (Command Line for disk partition issues)
  • Linux:
    • TestDisk (Command Line)
    • PhotoRec (Command Line)
  • Mac:
    • Disk Utility (GUI)
    • Disk Drill (GUI)

Secure Deletion Tools:

  • Windows:
    • SDelete (Command Line)
  • Linux:
    • shred (Command Line)
    • wipe (Command Line): wipe /dev/sdX
  • Mac:
    • diskutil (Command Line): diskutil secureErase 0 /dev/diskX

Common Assumptions About Deletion:

Many assume that formatting a USB drive removes all data securely. However, like SSDs, some data might still be recoverable unless specifically erased using secure deletion tools.


4. SD Cards (Secure Digital Cards)

Technology and Material:

SD cards, commonly used in cameras and smartphones, also use NAND flash memory. They provide fast read/write speeds and are more durable than hard drives due to the absence of moving parts.

Data Persistence:

Data can last 5 to 10 years, with performance degradation over time, especially after many read/write cycles.

Factors That Can Corrupt Data:

  • Physical damage (e.g., water exposure)
  • Power loss during data transfer
  • Incorrect ejection or unsafe removal

Data Recovery Tools:

  • Windows:
    • Recuva (GUI)
  • Linux:
    • TestDisk (Command Line)
    • PhotoRec (Command Line)
  • Mac:
    • Disk Utility (GUI)
    • Disk Drill (GUI)

Secure Deletion Tools:

  • Windows:
    • SDelete (Command Line)
  • Linux:
    • shred (Command Line)
    • wipe (Command Line)
  • Mac:
    • diskutil secureErase (Command Line)

Common Assumptions About Deletion:

Formatting or deleting files from an SD card does not securely erase the data. If you intend to sell or dispose of an SD card, be sure to use tools designed to overwrite and securely delete the data.


5. Blu-ray Discs, DVDs, and CDs

Technology and Material:

Optical media such as Blu-ray discs, DVDs, and CDs use laser beams to read and write data onto a reflective surface. Blu-rays have higher storage capacity (25GB or more), while CDs and DVDs have lower capacities (700MB for CDs, 4.7GB for DVDs).

Data Persistence:

Optical media can store data for up to 10 to 50 years, but this varies depending on the quality of the disc and the environmental conditions in which it's stored (heat, humidity, and exposure to light).

Factors That Can Corrupt Data:

  • Scratches or physical damage to the disc
  • Exposure to sunlight, heat, or humidity
  • Laser errors during reading or writing

Data Recovery Tools:

  • Windows:
    • IsoBuster (GUI)
  • Linux:
    • ddrescue (Command Line)
  • Mac:
    • Disk Utility (GUI)

Secure Deletion Tools:

  • Windows:
    • No standard tools for physical media erasure; consider overwriting via file system tools
  • Linux:
    • Shred (Command Line) for files on the disc, but no tool for erasing the disc itself.
  • Mac:
    • diskutil eraseDisk (Command Line) to erase the entire disk.

Common Assumptions About Deletion:

People often assume that wiping files off a disc is enough to remove them permanently. However, optical media is physically written, so the data can still be retrieved through specialized tools even after deletion, unless physically destroyed.


Remember: deletion is not the end of the story. Use secure erasure tools to ensure your data stays gone—permanently! There are more tools that I have not mentioned here. Searching the internet will show you more. Most of this blog post was written by AI.

14 October 2024

Viewing the progress of scientific knowledge as a tree

There was a scientific paper I found regarding a certain topic, but it was published in 2004. I wanted to see if there was any new research that built on that knowledge, but I didn't know if there was any tool which could help me search for it more visually. I decided to ask on Academia StackExchange, but decided to do a cursory search before asking. I found this question which led to multiple tools that did at least a fair job of visualizing papers via citations. Some of these are:

Citation Tree

https://www.citationtree.org/

Cit Net Explorer

You can download and use this tool.

https://www.citnetexplorer.nl/

Connected Papers

https://www.connectedpapers.com/

Inciteful

https://inciteful.xyz/

Lit Maps


VOS Viewer

https://www.vosviewer.com/

Zot Net

This appears to use strings to find relationships.

https://www.conundrumescapes.com/zotnet/zotnet.php

Scope for improvement

Most of these tools appear to rely on utilizing citations to build their tree. This is insufficient to correlate the actual knowledge that scientific research builds upon, since authors may not have cited all papers relevant to the actual knowledge they are building upon. Even the visualization graphs available offer a very poor visual representation and interactivity that is needed when navigating such information. Perhaps one way to improve on this, would be to use a large language model to analyze the contents of each paper and build links between papers based on the knowledge they build upon. This would help not only view but also better track the progress of knowledge in any scientific pursuit.

06 September 2024

Dear Game Creators: Please Make Rest Timers a Standard Feature

While you are in the flow of an enthralling game, you wouldn't actually stop to consider whether gaining some virtual points in the game is worth it, while your eyesight is being permanently ruined in the process. For the past few decades we've been in a phase of worsening eyesight. While this is great for the revenue of various companies, I believe it's time we do things more responsibly. It's time to make it a standard practice for every game to have an algorithm which pauses the game and allows players to close their eyes to rest.

If you aren't already familiar with The Real Cure for Eye Strain, I suggest reading it first.
Image by Christiana from Pixabay

Possible for multiplayer games too

With single player games it's simple enough for the algorithm to start assessing whether to pause the game or not as the timer approaches 20 minutes. For example, the game shouldn't pause just when the character is jumping over a pool of lava. However, for multiplayer games, synchronizing the pause is difficult due to latency. With good engineering, even this can be accomplished. 

For example, in a shooting game, as the timer approaches 20 minutes, an audio cue and a visual cue could inform players that it's almost time for a rest break, and timers can be synchronized among all players. When it's time for the break, a shield can be created around all players, to prevent anything from affecting them, and all players and game elements can be frozen. Before any player joins the game, they'd have to agree to what duration of gaming and rest intervals they are comfortable with.

I’m sure you could come up with more creative ways of integrating a rest timer into games and incentivizing players to take rest. 

An alternative…

…is to design games with levels or missions that can be completed in less than 20 minutes, and the player can be offered a break during the next level/mission’s loading screen. I know not all games can be designed like this, but I’m merely brainstorming here.

Help people heal. Prioritize health; not wealth.

It’s easy to put the onus on people to take rest. Similar to how you could say that it’s upto people to drive vehicles safely. Still, it helps to have seat belts and air bags. In the same way, game engines need tools built in for rest breaks. Kids and even adults often don’t understand the consequences of long hours of gaming, and end up permanently ruining their vision. I know game studios would not want to give players a chance to get distracted from the game, but we really need to create a better world where health is valued more than wealth and entertainment.

We’ve been taking our eye health too casually. Myopia is not normal. The need to wear spectacles is a massive danger sign that the eyes are severely affected and that one needs to immediately start a regimen of getting proper sleep and rest. The progression of myopia is an even bigger danger signal that our eyes aren’t able to cope with the torture we are putting them through. Our eyes are not evolved to keep staring in one direction for too long. Parents can actually do a lot to save their children from poor vision. Whether it’s office work or school or gaming, let us begin taking concrete steps to build healthy practices and standard procedures to prevent people from having to even need spectacles. Normal vision is too precious a gift to ruin.

04 September 2024

Taking screenshots on Android using the physical keys

For all these years, I've been annoyed at having to swipe my palm over the phone to be able to take a screenshot. Often, the window I'm trying to take a screenshot of, gets disrupted. Often the palm swipe does not get detected. 

Google searches led to nothing other than the palm swipe.

I tried asking ChatGPT, and it suggested pressing the power button and lower volume button simultaneously. It didn't work. But on trying it again, keeping the keys pressed for more than 1 second, it worked! 

I tried a Google search again, and it looks like there are websites that mention how to take screenshots. However, ChatGPT gave the answer in one simple sentence, and it was refreshing to be able to get the answer in a condensed form and directly, rather than having to go through multiple websites. This tech is truly a blessing.

22 August 2024

Building my own Flutter apps using GPT4 prompting was surprisingly fast

The stories about the possibility of a vast majority of programmers losing their jobs to AI appears to be true. I already demonstrated how GrootGPT was created simply by prompting ChatGPT. Just a year ago, when I tried creating simple Flutter apps using ChatGPT 3.5, it barely understood what I wanted, and I couldn't create a workable app. That's changed with ChatGPT 4o. It generated the entire code I needed, and all I had to do was prompt it regarding some errors encountered, and it gave me corrected code snippets for those. These are some of those apps:

Simple Notes

Clicking any note leads to a page where you can save/export it and type more text


I became tired of the standard Notes app on my phone not having a dark mode. Also, there was no guarantee that they were siphoning off the data for analysis. So I used ChatGPT to build me one, and then customised it. The APK file is available for download in my GitHub repository.

Automatic Slideshow

On selecting a folder, the slideshow begins

I had always wanted a really simple, minimalist slideshow app, but the ones on Google Playstore were ones with ads or fancy animations which I didn't want, or they didn't have a setting for changing the pause duration between images. So I created one which even searches subfolders for images and displays them with the best fit. Dark mode too, which is another plus of building your own app. ChatGPT generated the code for this too. The APK for this too is available in my GitHub repository.

I'm in the process of building more apps using ChatGPT, and that's where I noticed a few problems:

Limitations of using ChatGPT or other GenAI for programming:

  • For complex tasks, GenAI does a poor job of generating or correcting code. 
  • Moreover, it seems to depend on what programmers have already written. When I wanted to create a countdown timer which counted down days, hours, minutes and seconds, it generated code only to display hours, minutes and seconds, because that's what programmers usually write for. I had to edit it on my own to include a countdown for days, even though Flutter had days in its Duration class by default.
  • It does not follow good coding standards. If the code GenAI was trained with, included badly written code, the code it generates will also have badly written code. Instead of using const's it used string literals in multiple parts of the code.
  • It does not necessarily "know" much about good system design and design patterns. These are concepts for which you need skilled programmers.
  • For larger chunks of code, it tends to lose track of what the code already contains, and loses track of the prompt's instructions.

The good parts of ChatGPT and GenAI:

  • It generates working code extremely fast. Tasks that I would need a few hours or days to complete, LLM's can complete in a matter of seconds.
  • It makes debugging easier. I only have to paste an error message into the prompt field, and it not only figures out where the error is, it also explains the issue and provides corrected code as a solution.
  • It makes testing and locating misuse cases easier. It can actually generate test cases for snippets of code, and can even identify where code is lacking in security, potentially pointing out how people could misuse software. 
  • It somehow finds good/efficient programming practices too, and tends to teach me on how to write code better.

It has been only a couple of years since ChatGPT has impressed us. With claims of there being no limit to which it could scale, I'm quite sure these algorithms could be trained and have safeguards built to replace even the most skilled software engineers. 


17 July 2024

Booting into Linux after reinstalling Windows on a different disk

Operating system bootability sucks bigtime! Whether it's due to the Windows programmers or Linux programmers or the BIOS firmware programmers of various companies. I don't understand why these people can't come to an agreement of how to detect bootloaders and boot in a simple way.

If you have Windows installed on one disk and Linux installed on another disk, if you reinstall Windows, you won't be able to boot into Linux. In-fact, even when you press F11, GRUB won't be shown in the boot options. There are two things you can do in such a situation:

1. Point BIOS to the Linux bootloader

Simply restart the computer, go to BIOS, and depending on where in the boot options you find the option to specify the Linux bootloader, simply select it and set it as the first boot option instead of the Windows bootloader.

2. Do a boot repair

If the BIOS does not show you any option for the Linux bootloader, boot from a bootable Linux pen drive and run boot repair. In the start menu, simply start typing "boot", and you'll see the boot repair application. At least in Linux Mint, it's pre-installed. 


 

You might see an error message, but you could ignore that and go to BIOS like I mentioned in the first point, and set Linux GRUB as the first boot option. Everything will work fine then.

A slightly more involved method of doing it I've mentioned here, and there are some more options here.