Twin Peaks: Audrey, Billy, and living inside a dream

The lion the witch and the wardrobe

[Most of this was written before the finale, but surprisingly not only that the finale didn’t refute the below theory it strengthen it, so I added a whole new section that reflects that, and in retrospect the theory seems also to explain why Billy and Audrey were not in the finale, all the clues are here]

A second and a half before the Twin Peaks finale I have a theory about Audrey, Billy she’s looking for, and the dream theme repeated over and over again in Twin Peaks.

I will take you step by step down the rabbit hole, just bear with me:

Audrey is looking for Billy, her lover, the one she seems to sleep with while she was in a relationship with the dwarf/not dwarf Charlie. It is Billy who will save her from the miserable life she seems to be living.

In part 16 Audrey finally arrives at the Roadhouse, right after we are introduced to Eddie Vedder – not by his stage name, but by his real name – Edward Louis Severson the third, and that’s significant.
After Eddie’s show is over we discover that Audrey is not really in the reality of Twin Peaks, but in some dream she dreams, and in fact in the Twin Peaks reality she’s in a bright white room, in front of a mirror no less, probably at Ghostwood madhouse that was also mentioned in her conversations with Charlie.

In her existential crisis Audrey says “I feel like I’m somewhere else, have you ever had that feeling Charlie?“.

Then she adds “I feel like I’m somewhere else and feel like I’m somebody else, have you ever felt that?”

So where is she Charlie? What makes her feel like she’s not herself anymore?

An hint that Audrey is not in the Twin Peaks reality hinted to me by the user EpicEsquire that he read in this article, and I quote:
“Another clue is the Emcee’s words. He calls it “Audrey’s Dance”.  That is the name of that track on the Twin Peaks soundtrack alright, but in *our* world.  Not in the world of Twin Peaks.  She didn’t punch “Audrey’s Dance” on the RR Diner jukebox 25 years ago.  So what is *that* supposed to mean?” 

But who is Billy? There was some mentioning of Billy, that his truck was stolen, but they might just share the same name.

But what if Billy is Billy zane?


Wait a second, There is no Billy Zane in the reality of Twin Peaks, that’s the name of the actor, the one who plays Audrey’s lover from the original season, John Justice Wheeler


So let’s move to the movie for now, Twin peaks: fire walk with me, and remember Phillip Jeffries (another one that shares a first name with other character, Philip Gerrard).

What does Phillip Jeffries say, whom is our beloved David Bowie?
“We live inside a dream”


And in part 14, in Gordon’s dream – purposely Gordon, the one who is david lynch the director of the series in the non Twin Peaks reality – says no other than Monica Bellucci, the only character until then that appeared as part of the non Twin Peaks reality, actually elaborate on what David Bowie says:

“We are like the dreamer who dreams, and then lives inside the dream. “Troubled, she then asked:” But who is the dreamer?”

Friends, David Lynch tells us something here, over and over again, and we all ignore him, there are three “realities” in Twin Peaks (a number which lynch really adores).

The first is the “normal” reality of the series (which is quite funny to call it “normal”), the Twin Peaks reality.

The second is the unusual reality of the series, the reality of the red room, the black lodge, the white lodge, and so on.

And the third reality my friends, and here is the center of my theory, is our reality, us the viewers, this world, the world of Monica Bellucci, and David Lynch (not Gordon!).

Notice what happens in Gordon’s dream, he is looking straight to the camera – the fourth wall breaks, the wall that breaks in movies and series only when the character exit his own media and talk to us the viewers:


Gordon meets Monica in a street in Paris, so when he turns around and looks at us he also looks at a very specific place….


Directly at the exhibition space where David Lynch in our reality has a show IRL – David Lynch “Plume of Desire”!
(thanks Mike for reminding me that :))

Let’s continue, Billy is mentioned twice more.

Once in Part 14, in the Roadhouse, in a conversation between two women (that one of them as Maura noted his David Lynch own wife). Those two for some reason did not appear before or after this scene (and I bet they will not even appear in the finale and I have a reason), blabbering about how Billy jumped over the fence and was bleeding from the nose and mouth, and Yada yada yada.

Second time Billy is mentioned for a moment, is when the son of David Lynch ladies and Gentlemen, now his son in our reality, himself, running and asking where is Billy?
And then what happens? All people on the bar at the diner are replaced! Reality has changed back!

What am I actually saying here?

I’m saying that Audrey sees our reality, that Gordon in his dream sees our reality, that Monica Bellucci’s question can be divided into three parts and explained as follows:
1. “We are like the dreamer who dreams” – The We in this sentence are us, the spectators who stare at the screen and dream of Twin Peaks with David Lynch.

2. “and then lives inside the dream” – Which of us, the devoted fans, does not feel living inside a dream called Twin Peaks? That we spend the rest of the days glazed with dreamy eyes, and do not know what to do with ourselves until the next part arrives.

3. “but who is the dreamer?” And that of course are us, the series is taking place in our collaborative dream, Twin Peaks itself constitutes one of the main themes this season – the series is a “Tulpa”, the imaginary creation of us all.

Even Mark Frost’s “The Final Dossier”, which is the last Twin Peaks book, in its last chapter, supports this:

(Tammy Preston:) “How much of what I know, what I’ve been culturally attuned to believe, feels like the set of a play on a strange stage I’ve wandered onto without knowing why I’m here. I don’t know the lines, I don’t know what part I’m playing, I don’t even know what the play’s about or what it’s called.
I’m just here onstage, stuck in a dream,
lights shining in my eyes. Is anyone out there watching?“…

Again I’m not saying that Twin Peaks is a dream, I’m saying it exists just as our reality exists, and we manifest it in our dream. There’s a big difference.
One last thing, remember what pulled Dougie’s attention and after 16 long and frustrating hours manifest him to existence as Dale Cooper?

After Dougie hits the remote 3 times, it was none other than a movie from our reality – Sunset Boulevard, with a character which drove David Lynch the creator to name his Twin Peaks counterpart Gordon Cole.

And I wish that was what David Lynch tried to convey, because I must add that this is how I see most of the series and films in my life, and that is how I read most of my books – with a great belief that somewhere in some universe (just like “The Tempest” in Dan Simmons Ilium / Olympus books) we create, we “Tulpa” into existence what we read or watch.

And in this case Twin Peaks, we bring it into existence in our desire for it to take shape, and here in Twin Peaks the piece we created looks back at us in a mirror, us the dreamers, Shockingly (like us) saying three times, What? What? What?


Continue reading “Twin Peaks: Audrey, Billy, and living inside a dream”

The plot of Lost explained – The incident, “It worked” and the Long Con.

the plot of lost which its starting point is not in the crash of oceanic flight 815, but whether the blast of the hydrogen bomb by Juliet;

It explains why the incident is so important, why Juliet said it worked even though the flash sideway was not created by it and what is exactly the Long Con.

This is the Lost Plot Explanation which its starting point is not in the crash of oceanic flight 815, but whether the blast of the hydrogen bomb by Juliet;   (בעברית כאן)

It explains why the incident is so important, why Juliet said it worked even though the flash sideway was not created by it and what is exactly the Long Con:

a. In 1977 Juliet detonated the Jughead hydrogen bomb in the Swan construction

b. 2 major things set in motion by the blast:

1. The losties got back to their time otherwise Jacob would not have any candidates.

2. The hatch and its button were built in the future to preserve the electromagnetic energy.

c. Desmond reaches the island to guard the hatch and receives the fail safe key.

d. Desmond causes the losties to crash on the island the one time he did not push the button.

e. Here set in motion the “long con” of the smoke monster:

1. He appears as the smoke monster and chase Jack, and by that luring him into finding the “Adam and Eve” Cave.

2. The Finding of the cave leads to a cave-in on Jack and Charlie, which causes Charlie (by the explanation of Jack on the cave moth struggle that is strengthens him) to get off drugs,
which later be vital.

3. The smoke monster continues its long con and appears as Anna Lucia telling eco to help Locke.

4. Than it appears as Yemi (the brother of Eco) telling Eco he need to find the ? sign.

5. It appears again as Yemi telling eco to look for it in the cliff.

6. Eco goes to the cliff, finds nothing till he looks down and see the question mark in the grass.

7. Eco helps Locke to discover under the plane in the question mark spot the pearl station – the psychological Station.

8. That station that supposedly conducted psychological experiments on the people pushing the button
causes Locke to loose fate (fate VS Science yeah?) in the Island and wanting to prevent the button being pushed in the Swan station.

9. Locke later prevents Eco from pushing the button, and causing the start of the release of the
electromagnetic Energy that could destroy the World. And who comes to rescue?

10. Desmond with its Fail Safe Key (Do not forget than in the end he’s defined as a failsafe himself) uses it , stop the energy flow, and by that receives massive amount of electromagnetism.

11. That electromagnetism energy influence him in 3 ways:

i. Electromagnetism Resistance.

ii. To be unstuck in Time.

iii. Get its foretelling ability at least for a short while.
(He was not born with these abilities as some may think and the proof of that lies with that all of them happened only after the electromagnetism release through him, and even in its own words to Charlie: “You do not want to know what happened to me when I turned the failsafe key”)

12. The foretelling causes a vision to Desmond where he sees Charlie flipping a switch with a blinking Yellow light and drowning,and Claire leaving the island on the chopper,  and JUST because of the drowning they realize that the switch is in the underwater station, which leads him to take Charlie to that Station.

13. Remembers that Charlie was off drugs from the cave in lead to by smokie? Well that helped in 3 ways:
i. He was alive and in good shape to dive into the station.

ii. To realize that it’s truelove is with Claire and not the drugs (just as we saw in the limbo memories of the last episode).

iii. To lose his selfishness and sacrifice himself (for Claire to get off the Island) in order to turn off the
switch although he knows  he will drown.

14. Turning off the switch got Widmore to be able to put his team on the Island.

15. His Team chased Ben Linus , and the smoke master again appearing as Christian continue its Con and got Ben into turning the Wheel and moving the Island.

16. The turning of the wheel caused these things:

i. Prevented Widmore get a grip on the Island and killing all nominees ( as he
instructed his team to do).

ii. Moving Ben far from the island, letting him the possibility of organize the losties who managed to get off the Island into returning to the Island on Ajira

17. The Ajira flight caused these things:

i. Returned some of the losties to the island but to the year 1977.

ii. Returned the other losties to the original timeline

18. Now comes the interesting part:
The return of the losties to 1977 caused in circularity to Cause number a! (wonderful circularity that would not happened if they would not get off the island) meaning the Detonation of the Jarhead Bomb by Juliet.
And let us not forget Faraday that could not have helped them with the bomb if he had not had a constant keeping him in time and that was Desmond (As Faraday wrote in its journal That if everything will went wrong His constand is Desmond).

19. At last the Long Con of the smoke monster (I refuse to call it the MIB as he is not Jacob brother at all) comes to an end by enabling Desmond to stand in the pool of light and plug of the cork without dying of electromagnetism, and by that turning off the
restrictions about him leaving the Island.

But here also comes to end the Smoke Monster himself; he did not realize that by turning off the restrictions he would turn off his immortality which lead to Jack finally being able to kill him, which lead to the conclusion that the Long con was actually Jacob Long Con has he let Smokey do all of the above knowing that eventually his immortality will wear off and lead to the final destruction of the monster.

Yes and one last thing, Juliet said it worked as she saw whole of the plot unfolds like it was unfold here, and realized that the bomb she detonated it’s the incident that set the things in motion and making Jacob Long Con to

DataContractSerializer Utility for Serialize – Deserialize

A utility class that helps you serialize and deserialize objects with the DataContractSerializer

Here is a utility class that helps you serialize and deserialize objects with the DataContractSerializer.
There are 2 things you have to add yourself:

1. KnownTypes.txt file – in it you should insert for each known type (that is unknown to the DataContractSerializer) its full name of the type.
for example if the DataContractSerializer doesn’t recognize type T with namespace N, the KnownTypes file must have such line:


2. KnownAssemblies.txt – in it you should insert for each external assembly (that can be unknown to a type assembly at runtime) its location.
Meaning that if you want to serialize object O that Resides in Assembly A1 , that has a reference to some type T that resides In Assembly A2 (and therefore is not known to Assembly A1), you must add this line to KnownAssemblies file:

A2 Assembly Location

you should put both files in a resource file (here is “Resource1”) and thats it, you can easily serialize / deserialize objects.
(just remember to add to each Class you want to serialize / deserialize class attribute [DataContract] , and to each member you want to S/D member attribute [DataMember].

and the code:

 public static class SerializeUtil
        private static Dictionary<string, List<Type>> sAssembliesKnownTypes;

        private static Dictionary<string,List<Type>> AssembliesKnownTypes
                if (sAssembliesKnownTypes == null)
                    sAssembliesKnownTypes = new Dictionary<string, List<Type>>();
                    var tKnownAssemblies = Regex.Split(Resource1.KnownAssemblies, "\r\n");
                    foreach (var tKnownAssembly in tKnownAssemblies)
                return sAssembliesKnownTypes;

        private static List<Type> KnownTypes

                return AssembliesKnownTypes.Values.SelectMany(pTypes => pTypes).Distinct().ToList();

        public static string Serialize(object pO)
            MemoryStream tMemoryStream = new MemoryStream();
            DataContractSerializer serializer = new DataContractSerializer(pO.GetType(),KnownTypes);
            serializer.WriteObject(tMemoryStream, pO);
            ASCIIEncoding enc = new ASCIIEncoding();
            return enc.GetString(tMemoryStream.ToArray());

        public static object Deserialize(Type pType, string pXML)
            DataContractSerializer serializer = new DataContractSerializer(pType, KnownTypes);
            ASCIIEncoding enc = new ASCIIEncoding();

            MemoryStream tMemoryStream = new MemoryStream(enc.GetBytes(pXML));
            return serializer.ReadObject(tMemoryStream);

        private static void AddToKnownAssemblies(Assembly pAssembly)
            if (!AssembliesKnownTypes.ContainsKey(pAssembly.Location))
                var tKnownTypes = Regex.Split(Resource1.KnownTypes, "\r\n");
                var tNewTypes = new List<Type>();
                foreach (var tTypeStr in tKnownTypes)
                    Type tType = null;
                    if (pAssembly != null)
                        tType = pAssembly.GetType(tTypeStr);
                    if (tType == null)
                        tType = Type.GetType(tTypeStr);
                    if (tType != null)
                AssembliesKnownTypes[pAssembly.Location] = tNewTypes;


Gridview sorting both ascending and descending

If you want to make your gridview sort ascending and descending you would probably have to do it manually with the help of the view state.

this small example below will show you how:

attaching the Sorting event:

<asp:GridView ID="GridView1" runat="server" AllowPaging="True"
DataSourceID="ObjectDataSource1"  onsorting="GridView1_Sorting">

implementing the sorting event:

 protected void GridView1_Sorting(object sender, GridViewSortEventArgs e)
if (ViewState["HeadersDirection"] == null )
ViewState["HeadersDirection"] = new Dictionary();

var tSortDirections = ((Dictionary)ViewState["HeadersDirection"]);

if (tSortDirections.ContainsKey(e.SortExpression))
e.SortDirection = tSortDirections[e.SortExpression] == SortDirection.Ascending ? SortDirection.Descending : SortDirection.Ascending;

tSortDirections[e.SortExpression] = e.SortDirection;


and that’s it!
now the sort expression get “flipped” as it should 🙂

LINQ dynamic orderby and reflection

When you need to use the orderby query of linq on some object property, you sometimes need to specify it dynamically (in runtime).

so in order to do that we can use reflection.

the way to do that can be seen in this example:

static IEnumerable<Item> GetItems(string sortExpression)
from item in items
where <something>
orderby OrderBy(sortExpression , item)
select item ;

static object OrderBy(string sortExpression, Item item)
Type t = item.GetType();
var tPropertyInfo = t.GetProperty(sortExpression);
if (tPropertyInfo != null)
return tPropertyInfo.GetGetMethod().Invoke(item, null);
return null;

you can see that the item property invoked by reflection, so therefore the orderby get dynamically set.

Undoer (C#)

public class Undoer
        private static Stack sUndoStack = new Stack();
        private static Stack sRedoStack = new Stack();
        public static int UndoStackCount { get { return sUndoStack.Count; } }
        public static int RedoStackCount { get { return sRedoStack.Count; } }

        public static bool InsertEnabled = true;

        public static void Insert(Func pObj)
            if (InsertEnabled)

        public static T Undo()
            var tObj = sUndoStack.Pop();
            if (sUndoStack.Count &gt; 0)
                return sUndoStack.Peek();
            return default(T);

        public static T Redo()
            var tObj = sRedoStack.Pop();
            return tObj;

        public static bool CanUndo { get { return sUndoStack.Count &gt; 0; } }

        public static bool CanRedo { get { return sRedoStack.Count &gt; 0; } }

        public static void Init()


Company Automatic Hibernation

In order to cut on electricity costs on this recent Economic Crises, I came up with an idea.

It’s a simple one, but as I see it, it can save a company a lot of money on electrical.

The idea is to develop a cross-company process that will put every employee computer in hibernation at a specific time.

So how will the Automatic Hibernation work?

  1. A daily Hibernation time is set.
  2. 30 minute grace period before hibernation lets the user cancel the hibernation.
  3. If not canceled the computer hibernates.
  4. If the user wants to connect to the computer, a wakeup call is initiated on the computer, and it’s turned on.

Now we’ll see why people do not turn off their computer, and how Automatic Hibernation deals with each one of the problems:

  1. Don’t remember
  • Don’t need to remember, that’s why it’s automatic.
  1. 2. Don’t really care
  • Don’t need to care anymore, the company cares about the electrical bill.
  1. Want to get back to their already opened applications
  • Hibernation lets you get right back to the state where you were before the hibernation.
  1. Want to have the ability to remotely connect from home to their computer
  • In order to remotely connect to a shut down / hibernated computer we need to do 2 things:

1)      Make sure that each network card on an employee PC has what’s called wake up capability.

2)      Add a wake up feature to the company remote access.

What is needed for the Automatic Hibernation to be applied on the employees’ computer?

  1. Develop Automatic Hibernation.
  2. Enable wake up capability on all network cards (replace the ones that don’t have if needed).
  3. Add a wake up feature to the company remote access
  4. Reserve in each computer HDD enough space for the hibernation (RAM memory size will suffice).
  5. Inform all employees about Automatic Hibernation and the hibernation time.
  6. Install in all the computers the Automatic Hibernation process.

And finally what’s the rough cost cut for the company?

1.            E employees/Computers.

2.            C consumption cost per hour.

3.            about 8 hours (12:00PM – 8:00AM) hibernation.

E X C X 8 per day

E X C X 8 * 30 = per month

E X C X 8 * 30 * 12 per year

If we put some values in the variables like E = 5000, C = 0.02 $ then:

5000  X 0.02  X 8  = 800$ per day

5000  X 0.02  X 8 * 30 = 24,000$ per month

5000 X 0.02  X 8 * 30 * 12  = 288,000$ per year

We of course need to decrease from the above number a onetime development and deployment rough cost, so here is an example that is not that farfetched:

  1. 6000$ average developer cost for a month.
  2. 10 team members doing the development and deployment.
  3. 4 months development.
  4. 2 months deployment.
  5. ¼ network cards to be replaced (assumption).
  6. 10$ per network card.

6000$ X (4 +2) X 10 +( E = 5000)/4 X 10 = 372,500$

A cost that will be covered in about a year, and from that point on there will only be a cut on the company electricity costs.

Interesting idea, not?

XML Serialization Derived Types Problem Can be resolved!

I wanted to share with you a solution I found to a long annoying problem I had with C# Automatic XML Serialization.


I wanted to share with you a solution I found to a long annoying problem I had with C# Automatic XML Serialization.

Some of you may know this solution, but it is important so everyone should know that.

The background is XML Serialization of objects. C# gives us an automatic method to serialize object by using XMLSerializer.

For example serialize object A like this:

Class Base{}

Class DerivedBase : Base{}

Class A


Base b;

DerivedBase db;

public virtual XmlSerializer ser { get { return new XmlSerializer(typeof (A)); } }

public override string ToString()


var sw = new StringWriter();

ser.Serialize(sw, this);


return sw.ToString();



Now if we call A.ToString() we will get this Exception:

“The type namespace.DerivedBase was not expected. Use the XmlInclude or SoapInclude attribute to specify types that are not known statically”

Usually the solution is to add XMLInclude to Class Base:


Class Base{}

But 2 problems can rise in this implementation:

  1. What if DerivedBase is not in the namespace of class Base, or even worse in a project that depends on Base namespace, so Base cannot XMLInclude DerivedBase
  2. What if we only have class Base as a dll ,so again  Base cannot XMLInclude DerivedBase

Till now I used only this method while trying to be truth to the class and namespace inheritance structure, but now I confronted with some class that I don’t wanted to move to the DerivedBase Project.

So the solution to the 2 problems is by using XmlSerializer Constructor (Type, array<Type>[]()[]) :

XmlSerializer ser = new XmlSerializer(typeof(A), new Type[]{ typeof(DerivedBase)});

And even if class B will inherit A, and have some DerivedDerivedBase property, it can override the XmlSerializer ser property with its own XmlSerializer.

Hope it could help you like it helped me…