Monday, September 15, 2025

My journey of understanging the Theory of Relativity.

 Recently I had to teach a kids Sunday school on Genesis, and thought what a great idea it is to explain how time was created by exploring Theory of Relativity.  Every since I was a kid, Theory of relativity was also shroud in mystery and fascinating.  I watched a lot of online videos and explanations, but none can be satisfactory. I can't explain to my students what i don't know, so I thought, why not go from the very beginning and see how theory of relativity come to be?

 This brought me back to year 1887, Michelson–Morley experiment.  The initial goal of the experiment is to prove there are aether by observing inference patterns of a light source that splits into 2, one perpendicular to earth's rotation, and the other in parallel, and supposedly if there aether exists, light should slow down or speed up depend on if it goes against or in parallel to the aether wind.  Note here this theory depend on the assumption that aether is stationary or partially dragged by earth (proposed by Augustin-Jean Fresnel in 1818, confirmed by  Fizeau experiment  in 1851).

The experience failed and that supposedly disapproves the aether, and severely challenged Hendrik Lorentz's theory that aether is at absolute rest.  Then Oliver Heaviside derived the initial length compaction (on magnetic field) to be  , and Lorentz (also FitzGerald) build on this idea and applied this to molecules.  By doing this the idea of local time also appears, , where t is observer at rest in the aether and t' is one that is moving with regard to aether.

 

With the help of Poincaré, Larmor etc, it eventual became Lorentz transform:

 

 

with Lorentz factor

 

 

According the Lorentz transform, when object's speed v is much smaller than speed of light c, Lorentz factor is close to 1, and t',x' etc is very close to t', x'.  Only at high speeds the difference shows.  Also most likely from Lorentz factor, speed of light became the max speed in the universe, because once something reaches speed of light, the Lorentz factor is not calculable.   This is also partially because people use light to synchronize clock, due to light is the only know carrier in the universe with the fastest speed.

 And Einstein's theory of relativity is build on Lorentz transform, he took out of the need of aether but kept everything else, officially claimed speed of light is constant to all observers out of necessity of Lorentz transform and mathematical derivation only, with out any other proof, and implied that the speed of light is the max speed in the universe, also without proof.   The claim is needed to satisfy Lorentz transform only.

 

From the above points, it seems Einstien's theory of relativity, on top of that Lorentz transform, is conjured based on a branch of assumption derived from Michelson–Morley experiment.  The reader might ask, but don't we have evidence shows that clocks on fast moving rockets run slower?  There are a much simpler explanations than Theory of Relativity.  Atomic clocks work by atoms oscillating, and on accelerating objects, they are not oscillating horizontally, rather moving in a zigzag pattern due to the movement, and thus will be slower.

 

Tuesday, November 26, 2024

 If any number divided by infinite is 0, since time is infinite, how and why did we exist? Shouldn't the chance of our existence be 0?

Wednesday, September 28, 2022

html selectors and FS-IA6B receiver

 random posts.

Playing with remote controls and want to do some projects with them.  Bought a Flysky FS-i6X 6 channel remote controller, and want to use it to control some servos.  The manual is minimal, and found this site https://blog.vertile.com/article/flysky-i6-radio-setup-and-hacking-guide/ with good information. 


Found the page on html selectors https://drafts.csswg.org/selectors/

Tuesday, October 26, 2021

found my old account finally

 I lost this account for a long time, can't remember which user I used to login this.  Today by some really strange event (I found one of my favorite professors back in college, found his blog and that made me want to recover my blog).


Anyway, a lot has happened.  Started doing a bunch of arduino/pi stuff, but lost interest. I am now primarily on node/react, got looped back to C++/.net for a small side project for my church on and off (to recognize faces to solve the seat assignment issue at my church).  Let's see what happens next.

Wednesday, September 23, 2015

cloud-init slowness

Noticed my ubuntu box have very slow startup time, and it is cloud-init.

edit /etc/cloud/cloud.cfg.d/90_dpkg.cfg, and change [...] to [ None ], fixed for me :)

Friday, April 3, 2015

icse014a usb problems

Recently I started getting interested in automation.  So for a small project I want to try out, bought icse014a 8 relay control via USB.  It arrived today and can't get it to work, device shows status 10 (with a yellow question mark).

After some search found this page: http://leftbraintinkering.blogspot.com/2013/05/usb-to-serial-prolific-2303-device.html  .  The guy was doing the same with some other device and  found windows 8 no longer support the driver.  So some smart guy wrote something to fix it https://www.sendspace.com/file/5m5afw

Now it is working and I can control the device, thanks guys!

Thursday, June 5, 2014

CallContext ThreadStatic and SQL transactions

Recently we changed all our DB calls to async/await, as they are much more "thread" efficient.

And most of our old code, the SQL transactions runs on Thread local.  This won't work on async/awaits since now they are all interrupt like and can run on any thread. (we are not running with coordinated transactions for other reasons)

One of our guys implemented the new way initially with a static context, and we have to pass the context name to all calls.  When it is time for me to fix some of the code, it just feels so unnatural, no only there are a lot of code changes, if you miss one they won't be in the transaction.

And during the research, someone found CallContext, it works very much like Thread Statistic, and I think Microsoft copies it to new threads, so with simple fixes everything is working again (of course anything in a transaction is synchronized again without the DTC, that we can live with for now).

Sunday, February 23, 2014

c# async model

I dislike the async/await way of doing things, thinking that it made the developer's life harder, hiding the threading for no reason (not to mention the messed up stock). Recently one of our companies project was done with that, and I was able to make the project faster by remove some of the async stuff (there is an operation that writes on a single pipe, so I made it single threaded and used a queue instead of the async way of doing things). However during a recent discussion, one of my college's comment kind of wake me up a bit. He said the reason async/await is better is that internally it actually queue things up. Now that made sense. I think MS should make it even better, that is on any IO operation on a task, it should immediately queue it and make the thread available for next queued task, this way we can actually do away with the async/await mess and the complexity will be handled internally without any developer mangling.

Monday, September 23, 2013

Les Misérables

Finished watching Les Misérables tonight, such a pity I got so busy have to finish a movie over a week in small pieces. Read the story as a cartoon long time ago, and the movie certainly bring back most of the memories, I have to say for a opera it is well done. I don't like some of the singing, but I love the ending song and it brought down some tears.

Monday, July 1, 2013

Age of sorcery build path

I recently started to play a game on windows phone, Age of Sorcery. Found out no one has posted its building upgrade path yet, so here it is, hopefully it can be helpful to other new players when they google: Academy => Shrine of fire 1 Academy 2 => shrine of wind 2 Academy 3 => shrine of earth 3 Academy 4 => shrine of fire 4 Academy 5 => City walls 5 Academy 6 => Shrine of Fire 5 Academy 7 => shrine of fire 6 Academy 8 => Castle 7 Academy 9 => Shrine of wind 8 Academy 10 => shrine of earth 10 House 2 => farm 1 House l3=> farm l2 House l4=> mithril 3 House l5 => farm l4 House l6 => Shrine of earth 1 House 7 => Academy 1 House l8 => warehouse l6 House 9 => City walls 7 House l10 => Warehouse l10 Warehouse 2 => Castle 1 Warehouse l3=> mithril l2 Warehouse l4=> House 3 Warehouse 5 => Shrine of Wind 2 Warehouse l6 => castle l5 Warehouse 7 => Castle 5 Warehouse 8 => house 7 Warehouse 9 => Castle 8 Warehouse 10 => City walls 9 Farm 2 => Castle 2 Farm 3 => Warehouse 2 Farm 4 => Castle 2 Farm 5 => Warehouse 4 Farm 6 => Shrine of Fire 1 Farm 7 => Academy 4 Farm 8 => City Walls 6 Farm 9 => City walls 8 Farm 10 => Warehouse 9 City walls 2 => Castle 1 City walls 3 => mithril 1 City walls 4 => farm 4 City walls 5 => House 6 City walls 6 => Warehouse 7 City walls 7 => Farm 7 City walls 8 => Mithril 7 City walls 9 => castle. 8 City walls 10 => castle 10 Castle 2 => House 1 Castle 3 => Warehouse 2 Castle 4 => City walls 3 Castle 5 => House 4 Castle 6 => Academy 5 Castle l7 => city walls l7 Castle 8 => Academy 7 Castle 9 => forge 5 Castle l10 => academy l9 Mithtil 2 => Warehouse 1 Mithril 3 => Warehouse 3 Mithtil 4 => Warehouse 3 Mithtil 5 => Academy 2 Mithril 6 => Academy 2 Mithril 7 => Castle 6 Mithtil 8 => city walls 7 Mithril 9 => Shrine of Fire 7 Mithtil 10 => shrine of fire 10 Shrine of wind => Castle 2 Shrine of Wind 2 => farm 3 Shrine of Wind 3 => mithril 3 Shrine of Wind 4 => mithril 6 Shrine of Wind 5 => farm 6 Shrine of Wind 6 => Castle 6 Shrine of Wind 7 => city walls 7 Shrine of Wind 8 => Farm 8 Shrine of wind 9 => Academy 9 Shrine of Wind 10 => Castle 10 Shrine of earth => Castle 3 Shrine of earth 2 => castle 3 Shrine of earth 3 => mithril 4 Shrine of earth 4 => Warehouse 5 Shrine of earth 5 => Castle 5 Shrine of earth 6 => forge 4 Shrine of earth 7=> forge 6 Shrine of earth 8 => Academy 7 Shrine of earth 9 => Academy 8 Shrine of earth 10 => Castle 10 Shrine of Fire => Castle 4 Shrine of Fire 2=> city walls 4 Shrine of Fire 3 => mithril 5 Shrine of Fire 4 => House 6 Shrine of Fire 5 => Castle 6 Shrine of Fire 6 => forge 4 Shrine of Fire 7 => Academy 6 Shrine of Fire 8 => Academy 6 Shrine of Fire 9 => Academy 8 Shrine of Fire 10=> Castle 10 Forge => Castle 7 Forge 2 => Shrine of wind 4 Forge 3 => Shrine of earth 5 Forge 4 => shrine of fire 5 Forge 5 => city walls 6 Forge 6 => shrine of earth 6 Forge 7 => shrine of wind 7 Forge 8 => Shrine of Fire 8 Forge 9 => city walls 9 Forge 10 => castle 10

Wednesday, May 8, 2013

I xxking love science

Take a look at this face book page, you will love it! https://www.facebook.com/IFeakingLoveScience

Friday, March 1, 2013

Entity framework and varchar

Just learned about EF and varchar types. EF strings are unicode and when querying database, it will cause performance problems (I was surprised by this, one would assume it should cast to varchar first...). There are 2 solutions, one is to use EntityFunctions.AsNonUnicode, i.e. from t in table where t.id == EntityFunctions.AsNonUnicode(id) The other is use attribute, [Column(TypeName = "varchar")] on the field.

Sunday, February 17, 2013

The reality of a developer's life

Very funny link for us developers :-) http://www.lordofthejars.com/

Wednesday, February 13, 2013

EF decimal precision

Encountered a strange problem at work. Entity framework code first, entity's decimal field always save to 2 decimal points even though the field has 4. Turned out in EF4 you need to specify percision: modelBuilder.Entity().Property(e=> e.property).HasPrecision(x, d);

Thursday, January 24, 2013

Cool HTML5 page

Very cool, roll and see some of the tricks :-) http://fff.cmiscm.com/#!/main Also some tests seems run faster with IE, but some can't be run on IE.

Wednesday, December 5, 2012

Tuesday, September 18, 2012

Parasits and brain tumor

I was reading some thing about parasites, some parasites that usually inhabits in our digestive systems actually ends up in our brain and can cause a lot of issues. However, this reminded me of something. I have recently learned that brain tumor is very hard to treat because there is a blood barrier between brain and blood vessels. What if we can use the parasites (or borrow the way it went into the brain) to deliver cancer treatment drugs for brain cancel patients?

Friday, July 13, 2012

Best Starcraft match so far

Janbi vs Zero Was such a surprise ending, keep me on the entire match :-). Enjoy!

Thursday, May 24, 2012

dead lock with insert

Recently I encountered a strange problem of dead lock. Our code deadlocks when 2 process insert record into the same table (Both process insert into table A with different record). I was amazed that this could happen, since a deadlock always requires 2 resources and the table only have 1 index. A closer look and the table was selected before, got rangeS-S lock, and the insert tries to upgrade to rangeI-N, which dead locked with the first. But why this have not happened before? Well this will only happen for serialize isolation level. Our database is on read committed, and after I took the code out and run in multiple test programs they are all fine, this lead me to the last suspect, nservicebus (we use it to receive messages). NserviceBus default to serialized isolation level, so one line of code to set it to read committed fixed the dead lock.