Car buying / renting / License:

 


 

Driver's License:

Before we talk about buying/renting, let's get to know the process of getting a drivers License (DL). I'll be talking about steps to get DL in Texas. Rules may vary from state to state, but general process remains similar.

Teen Driver's License: 

In Texas, a teen b/w the age of 15 and until his 18th B'day, can apply for a teen Learners License. This is a License that your teen can get easily by passing an online test (a quiz). Then he can start learning how to drive with an adult in the front seat of car all the time. The great news is that you can add the teen to your auto insurance as being on "Learner's License or Learners Permit", with no impact to the rates. The teen can also decide to get a real DL later on, for which he has to give a real driving test. But then, your auto insurance rates will go up a lot, as teen's auto insurance rates are easily $200-$300 per month, when driving by himself/herself.

DPS Link on how to apply for learner's permit => https://www.dps.texas.gov/section/driver-license/texas-learners-license-teen

Steps:

  1. Order PTDE (Parent Taught Driver Education) pkt from TDLR. IT costs $20. It's 1st page has receipt number that you'll need when applying for license => https://www.tdlr.texas.gov/ParentTaught/PTSelect.aspx
  2. Now go and buy "Online Driver Education" program. Here's a list of TDLR approved courses. They don't list the rates upfront, so you need to click on each of them, to find the rates. 
    1. Link from TDLR => www.tdlr.texas.gov/driver/education/providers/search/
    2. One of the cheapest ones for $45 is here => https://www.easytexasdriversed.com/texas/course/parent-taught-drivers-ed-14-17
    3. Other one that I ordered is $50 here => https://ptde.smartwaydriving.com/
  3. These courses have Total 24 hours of online training material. You need to complete module 1 for the 1st 6 hours of online training. Then you are eligible to take the written exam, which is also administered online as part of that pkg (Make sure your pkg says that it has online test included. Most of them do).
  4. Once you have passed the online quiz in step 3, you need to take all supporting documents to DPS to get your teen's Learner's permit.

 


 

Auto Buying:

You can buy a car at any car dealership in USA. The biggest question is which car to buy and how to get the lowest price for it.

1. Which Car to buy:

Time and again, Japanese cars have proved to be very reliable in long run. I've Toyota and Honda, and both have run for 10 years without requiring any fix except changing Tires, batteries once in 1st 10 years and oil/filter change every year. Few popular cars are:

  • Mini Compact cars: These are the smallest cars. Chevy Spark falls in this category, and is usually the cheapest car.
  • Sub Compact cars: These are the smallest cars
  • right after Mini Compact. Hyundai Accent is a very reliable car here. Even though it's Korean car, it is at par with Japanese cars.
  • Compact Cars: Compact cars and above are called Sedans and they can still seat 5 very comfortably. Hond Civic and Toyota Corolla are the best cars in this category.
  • Mid size cars: These cars are bigger than Compact cars. Honda Accord and Toyota Camry are best options here. People with kids usually opt for mid size cars over Compact cars as they have more legroom, bigger trunk, and are more comfortable with 5 people in the car.
  • Minivans: If you have a family of 4 or more, there's nothing more convenient than a minivan. It can seat 7 or 8 people. Most popular minivans are Honda Odyssey (seats 7 or 8 depending on the model) and Toyota Sienna (seats 7)

 

2. What to pay:

This is a harder problem, as what is a good price to pay. We need to buy car at a price, where if we try to sell the car te next day, we shouldn't incur a loss. That would be the ideal price to pay, but may not always be possible yo buy a car at that price. I look at used car price for a given model, and year, on various websites, and then that becomes the baseline for the price of that car. Any new car that you buy for that model and year should be close to that price include all tax, licensing fees, etc.

My go to site is www.truecar.com. You can use this to check price of used car, and then compare of new car on different websites as www.edmunds.com, www.kbb.com and www.truecar.com.

 


 

Auto Renting:

You always have the option of renting a car. Many times it's a necessity, i.e when you are flying to a different city, you would need to rent a car.  Renting a car usually costs $20-$40 per day (as of 2025). Sometimes you can get cars for < $10 per day, as I've seen happen a lot at expedia, when renting from an airport location. However, it appears to be random, on when it shows up.

 


 

awk:

awk is the widely used utility for text manipulation in text based files. It can do a lot of complicated pattern matching, stripping, etc that will require bunch of code in any other scripting language. awk and sed are very commonly used together and almost suffice for 99.9% of text manipulation encountered in real life.

awk is a full scripting languages, though it's most suited for text manipulation. awk was named after the initials of the people who wrote it. Now we have the GNU implementation of awk called gawk. gawk is the one that is installed on all Linux systems, and awk actually is a soft link to gawk.

$ awk --version => shows "GNU Awk 4.0.2"

Good tutorial on awk: https://www.howtogeek.com/562941/how-to-use-the-awk-command-on-linux/

Syntax:

awk syntax is extremely simple. The entire awk program is enclosed in single quotes ('). It has rules, comprised of patterns and actions.

  • Patterns: Patterns are enclosed in curly braces { }. If no pattern is provided, then it works on every line of text since all lines match.
  • Action: Action is executed on text that matches the patterns.
  • Rule: Together, a pattern and an action form a rule. 
  • Fields: Fields are separate regions within a line. We define fields since that's the only way we can extract certain data within a piece of text. By default, awk considers a field to be a string of characters surrounded by whitespace, the start of a line, or the end of a line. Fields are identified by a dollar sign ($) and a number. So, $1 represents the first field, $2 the 2nd field, and $NF the last field (NF stands for number of fields). $0 represents the full line from start to end. If we want to change the input field separator to something else, we should use option -F (separator string) option to tell awk to use that (i.e -F: uses colon (:) as the separator to figure out fields for input file). NOTE: no space b/w -F and : Also, this -F option is before we we write the pgm in quotes. ex: awk -F: '{print $2}'. We can also write awk 'FS=":" {print $2}' => This also does the same thing as FS means i/p field separator.
  • awk works on an input text file and can show output on screen using "print" function, or redirect the output to another file. Just as input file has fields, o/p file also has field separator which is a space by default. To change the separator to something else, we use option OFS=":" (output field separator is a :). This option is to be used within quotes (i.e as part of the awk pgm). ex: awk 'OFS=":" {print $1}'. This OFS applies to only those print statements that are following that OFS.

Few more awk cmd:

  • print: print function prints strings by enclosing in double quotes, i.e print "my name is". To print var, we don't need quotes. ex: {print "my name is"} {print $name}. or in one as {print "my name is", $name}. If $name is put within quotes, then it's treated as a literal, and is printed as is =>"my name is $name". comma is optional, however we put as it automatically invokes a space. See below ex:
    • print specific field of certain cmd:
      • ls -al | awk '{print "3rd field" $3}' => This takes the o/p of ls -al cmd and prints "3rd field" followed by the third field of each line, which is the userid of the owner. With no comma, there is no space b/w field and $3. To invoke space either add a space within the text as "3rd field " or add a comma.
      • awk '{print $1 $4}' input.txt => This prints field 1 and field 4 of each line in file input.txt. However, the printed fields will have no space b/w them, so they will appear as one word. The output field separator is invoked on putting a comma, i.e {print $1,$4}. To change it to something else, use OFS=":". i.e awk 'OFS=":" {print $1 $4}' input.txt
    • convert field to number: When we get certain field from a file, let's say $3, it's still grepped a sa string. So, if we try to use that number outside of awk, it will error, complaining it's not numeric. In such cases, add 0 to the field to automatically convert it to number.
      • set num1 = `zgrep "Number" *.report.rpt.gz  | awk -F" " '{print $5+0}'; set sum = `echo "$num1 + $num2" | bc -l` => In this, if we just use "print $5" without adding a 0, then that field is returned as a string. Adding it with num2 gives an error. But if we add 0, then num1 automatically is cast to integer/float and and then summing works.
  • BEGIN/END rules: A BEGIN rule is executed once before any text processing starts. In fact, it’s executed before awk even reads any text. An END rule is executed after all processing has completed. You can have multiple BEGIN and END rules, and they’ll execute in order. We can have as many lines of cmd as we want in BEGIN and END by enclosing them in {}, and they will execute only once in begin and end of awk program.
  • awk as script: We can also write a full script in awk, especially when pgm gets big. # are comments. First line needs to be #!/usr/bin/awk -f. See the ex on link above.

Few examples of awk:

  • pattern matching and conditions: We an add specific conditions:
    • awk -F: 'BEGIN {print "START"; FS="/"; OFS=":"} $3 >= 1000 {print $1,$6} END {print "DONE"}' /etc/passwd => This prints 1st and 6th entries only if 3rd entry is >= 1000.
    • awk '/^UUID/ {print $1}' /etc/fstab => This searches for pattern UUID at start of line, and all lines that have that, have their first field printed.
    • To extract all lines between given markers => This is very common use case, where we want to use scripts to grep for text b/w markers:
      • awk '/## START OF MARKER ##/{a=1}/## END OF MARKER ##/{print;a=0}' /home/my.rpt > ~/extracted_marker.txt => extracted_marker.txt has all text b/w "START" and "END". "a" is just a var (can be any var name). CMD "print" is optional, as by default print happens.
      • awk '/## START OF MARKER ##/{flag=1} flag; /## END OF MARKER ##/{flag=0}' /home/my.rpt > ~/extracted_marker.txt => alternative way of above cmd. The line "flag" prints lines while flag is set. This is a shortcut of this cmd => {if (flag==1) print}

 

Substitute text between specific Markers with contents from another file: This is not easy. We saw how to do this in sed. But that sed cmd doesn't work in any other shell besides bash. So, we have an alternative way in awk cmd, that achieves this functionality.

awk 'BEGIN {flag=0;} /START of pattern/,/END of pattern/ { if (flag == 0) { system("cat replacement.txt"); flag=1} next } 1' original_file.txt > modified_file.txt => Here we grep for markers in original_file.txt and replace all the text b/w those markers (including the markers themselves) with text in replacement.txt. We save the resulting modified file as modified_file.txt (instead of saving as original_file.txt)

However, if are patterns are stored in var, or the file names are var, then we have to get those var outside of single quotes (As anything inside single quote is for awk to evaluate). When we put in double quote, then shell expands it, and then awk just concatenates that when running the cmd.

ex: awk 'BEGIN {flag=0;} /## START OF '"$pat1"' ##/,/## END OF '"$pat2"' ##/ { if (flag == 0) { system("cat /home/'"$name"'_replacement.txt"); flag=1} next } 1' original_file.txt > modified_file.txt

 


 

 

 

 

College Admissions:

Things that you should get into to get into a good college:

The first thing that any college admissions officer wants to see when looking at extracurriculars is that a student sticks with the activities they choose. Devoting oneself to one club and one sports team is far more impressive than trying a new club and a new sports team every year. This shows that a student is able to stick to something and wants to perfect skills and lessons.

The next things that a college admissions officer looks for are passion. In any application, a student should make sure that they explain what they love about the extracurricular activities they chose during their high school years.

The final thing that every college admissions officer looks for is leadership. This is key. Above all, a student should look to assume a leadership role at some point in the extracurriculars they pursue. Through time, leadership roles should be highly possible and will look fantastic on any college application.

Non SDC - extracting lib data

Many times, we want to extract info for std cells from the library (.lib liberty files), such as power consumption, delay for certain FanOut, etc. It's not always feasible to get this from design data, as design may not have the cell we are looking for, or the Fanout of the cell may be different than the Fanout we are interested in. In such cases, we have to instantiate our own dummy design in the current design, and then run SDC or Non SDC cmds to get the required info.

We should use Synthesis tools to get info from library, as it's easy to instantiate our dummy design into the current design. Timing tools, such as PT are not really meant to modify an existing netlist, so they are restricted in how much they allow you to modify the netlist. Most of the times, it's easy to directly modify the netlist and insert your dummy logic in there, but over here, we'll modify the netlist using ECO cmds (For ECO cmds, see in ECO - Engineering Change Order section)

Sample Dummy circuit

Ex: Let's say we want to test the delay for a Fanout of 4 for an inverter in a given library. We should first create such an inverter cell, connect it to port on input and output, and then use a driver on i/p and load on o/p. Below are the steps for extracting lib data using various tools.

PrimeTime:

Create a dummy logic of an inverter where we first instantiate a dummy cell, then connect it to ports and then drive it appr and get timing.

  • Instantiate an inverter:
    • get_lib_cell *tsmc_n3*/INV_NOM_D1_*_SVT => shows INV_D1_NOM_SVT cell.
    • create_cell dummy_test [get_lib_cell *tsmc_n3*/INV_NOM_D1_NOM_SVT] => create an inverter with that std cell
    • get_pins -of [get_cells dummy_test] => This should show pins of Inverter (i.e IN and OUT)
    • get_att [get_pins dummy_test/IN] pin_capacitance_max => should show various attr present in .lib
  • Now create and connect nets on i/p and o/p pins, and then connect to new/existing ports.
    • create_net dummy_in; create_net dummy_out
    • connect_net [get_net dummy_in] [get_pin dummy_test/IN]; connect_net [get_net dummy_out] [get_pin dummy_test/OUT]
    • create_port -direction "out" {dummy_outp}; create_port -direction "in" {dummy_inp} => creation of new ports is not allowed in PT, so we need to use existing ports.
    • connect_net [get_net dummy_in] [get_port EXISTING_SPARE_PORT1] =>This won't work either as port already has a net with the port name, so it violates rule #2 of connect_net
    • disconnect_net -all [get_nets dummy_in]
    • connect_net [get_net -of [get_port EXISTING_SPARE_PORT1] [get_pin dummy_test/IN] => This connects pin to port
  • Now connect load on o/p pin and driver on i/p pin:
    • set load_fo4 [expr [get_att [get_pins dummy_test/I] pin_capacitance_max] * 4] => sets o/p load to 4X i/p load (so that gives FO=4)
    • set_load $load_fo4 [get_pins dummy_test/OUT] => Doesn't work as set_load cmd can only be used on ports and nets, and not on the pins directly.
    • set_load $load_fo4 [get_net dummy_out] => works as it's applied on net.
    • set_input_transition 100 [get_port EXISTING_SPARE_PORT1]  => instead of driving it with a driver cell, we instead directly control the transisition time
    • report_timing -thr dummy_test/OUT -tran -cap => reports delay of cell
    • get_attribute [get_timing_path -thr dummy_test/OUT ] arrival => This also reports delay, but now it can be automated in a script

DC:

 

Disease and Medicines:

Biology is not only about how human body works, but also about what makes it not work, and how to fix it.

Bioavailability of Medicine:

It's the fraction (%) of an administered drug that reaches the blood for systemic circulation. By definition, when a medication is administered intravenously (via veins), its bioavailability is 100%. However, when a medication is administered via routes other than intravenous, its bioavailability is generally lower than that of intravenous due to intestinal endothelium absorption and first pass metabolism. Since the concentration of drug in blood varies with time, the whole area under curve is taken for calculation purpose. Bioavailability refers to avg value as the absorption rate varies greatly among individuals. Bioavailabilty is a very important term for drugs, as your eventual "mg" dosage per day will depend on it's bioavailability.

Link: https://en.wikipedia.org/wiki/Bioavailability

 

Diuresis:

It's the excretion of urine, especially when excessive. In healthy people, excess water drunk is passed in form of extra urine to maintain fluid balance. People with heart failure (HF) and kidney disease have difficulty getting the excess water out of their body, which results in fluid accumulation in body, a condition known as edema.

Diuretics are medicines that help get this extra fluid out of the body, by increasing urine production. As such they benefit people with edema, and are also known as water pills. Diuretics are also used to lower blood pressure (BP) for people with high BP (Hypertension). In such cases, deuretics do lower water in the blood, but the reduction in BP occurs due to other mechanisms. Any removal or absorption of fluid in blood disturbs the balance of electrolytes, such as sodium, potassium, calcium, magnesium, etc in blood. So, people taking deuretics should watch out for these too.

There are mainly three types of diuretic medications.

  • Thiazide: Thiazides are the most commonly prescribed diuretics. They’re most often used to treat high blood pressure. These drugs not only decrease fluids, they also cause your blood vessels to relax. Thiazides are mostly taken with other medications used to lower blood pressure. Examples of thiazides include:
    • chlorthalidone
    • hydrochlorothiazide (Microzide)
    • metolazone
  • Loop diuretics: Loop deuretics are often used to treat heart failure. While Thiazide diuretics are more effective in patients with normal kidney function, loop diuretics are more effective in patients with impaired kidney function. Loop diuretics are also used to treat high BP, though primary use is to for HF patients. Loop diuretics usually have a "ceiling" effect where there is a maximum level of dosage where further increase in dosage will not increase the clinical effect of the drug. Examples of these drugs include:
    • furosemide (Lasix) =>
    • torsemide (Demadex) =>
    • bumetanide => A dose of 40 mg of furosemide is equivalent to 20 mg of torsemide and 1 mg bumetanide.
  • Potassium-sparing diuretics: Above 2 diuretics disturb electrolyte balance and may cause lower potassium in blood (especially for people with low potassium in blood), which is an important nutrient. Potassium sparring diuretics are an answer to that. They reduce fluid levels in your body without causing you to lose potassium.  

 

 


 

Diabetes:

If you have diabetes (which is high levels of sugar or glucose in your blood), you will require to measure your sugar levels multiple times a day, and adjust your dosage of insulin based on that. There are glucose meters that measure the glucose level. These meters themselves are usually free or cheap, but the strips that come wit these are pretty expensive ($1 per strip). Many meters come with 10 free strips and 10 free needles.

Prodigy sells strips for 10 cents per strip for their glucose meter. This is the cheapest option:

Prodigy strips on ebay (13 cents/strip as of Jan, 2025) => https://www.ebay.com/itm/335545752368