Zach Margolis The life and times of Zach Margolis http://www.zachmargolis.com OOPS I LEFT MY CAPS LOCK ON. Thu, 23 Oct 2008 20:31:23 MST <p>A recent trend in websites: HUGE ALL-CAPS TEXT ON A WHITE BACKGROUND, with <a href="http://www.chucknorrisfacts.com/">Chuck Norris</a> style humor. Here are the three I've come across, with some choice quotes. I'm sure there are plenty more.</p> <ul> <li><a href="http://waltmossbergsays.com/">WaltMossbergSays.com</a> pokes fun at the influence of Wall Street Journal writer Walt Mossberg<br /> <em>BAAAAAAAAAAAH. ::CHEW:: ::CHEW:: ::GRAZE::</em></li> <li><a href="http://barackobamaisyournewbicycle.com/">BarackObamaIsYourNewBicycle.com</a> is a list of things Barack Obama would do just because he's your friend, if he were your friend (which he definitely is).<br /> <ul> <li><em>BARACK OBAMA HELPED YOU MOVE A SOFA</em></li> <li><em>BARACK OBAMA THOUGHT YOU COULD USE SOME CHOCOLATE</em></li> </ul></li> <li><a href="http://chocklock.com/">chocklock.com</a> has something to do with <a href="http://furbo.org/">Craig Hockenberry</a> (of the Iconfactory), and I can't quite tell what it is, but it appears to be some big in-joke. I have a feeling it's related to his c4[2] presentation entitled IPHONE ITS NOT A FRICKEN MINATURE LAPTOP OK. The best part about the site is that the style extends into the source code for the page.<br /> <em> JUST THINK HOW MANY MEGABYTES YOU WOULD HAVE IF YOU ONLY USED <a href="http://twitter.com/ahruman/statuses/950394189">SIX BITS</a></em> </li> </ul> <p>I think it might be time for a redesign! Just kidding.</p> <p>Tags: internet</p> http://www.zachmargolis.com/archive/63 http://www.zachmargolis.com/archive/63 Better Late Than Never Sat, 25 Oct 2008 13:27:35 MST <p>I just updated my <a href="/web_nojs/">web design</a> portfolio to include projects from this summer. I guess it's only a month late or so, no big deal.</p> <p>Tags: portfolio,site update,</p> http://www.zachmargolis.com/archive/64 http://www.zachmargolis.com/archive/64 Hash Tags, and Catching the Back Button Mon, 10 Nov 2008 11:07:18 MST <p>I recently found a new Javascript trick that I'd like to share with the world. So it all starts when I was looking at <a href="http://taptaptap.com">taptaptap.com</a>, a company that sells iPhone apps. I noticed that I could click to the different sections of the page, and they would animate. Then, I could click my browser's back button, and they would also animate. Amazing! How could they do that? In Javascript there is no way to directly catch a back button press as an event, so there is a little script running on a loop to look for the signs.</p> <p>Web pages can use hash tags, or <kbd>#something</kbd> to jump to an element on the page with the ID set to <kbd>id="something"</kbd> and moving does not require a reload. This is important because it saves time, and scripts that are running stay active. So, when a user clicks on a link that goes to <kbd>&lt;a href=&quot;#something&quot;&gt;</kbd>, the location in the URI up at top changes to reflect this new &ldquo;hash tag.&rdquo; This means we can use Javascript to catch that change.</p> <p>So, here are some important Javascript values to know:</p> <ul> <li><kbd>document.location</kbd> will give you the full text of the URI</li> <li><kbd>document.location.hash</kbd> will give you everything including and after the <kbd>#</kbd> in the URI</li> <li><kbd>setInterval(<em>function</em>, <em>ms</em>)</kbd> will call <em>function</em> every <em>ms</em> milliseconds. It goes on forever, unless you use <kbd>stopInterval()</kbd>, which is not necessary for this exercise.</li> </ul> <p>Alrighty, now we have the tools, but we are going to need to call some functions as soon as the page loads. My favorite way to do this is reference the source of the script in the <kbd>&lt;head&gt;</kbd> of the page, and then run the scripts at the end of the page.</p> <p>So in the <kbd>&lt;head&gt;</kbd>, I include:</p> <code> &lt;script type="text/javascript" src=&quot;/js/functions.js&quot;&gt;&lt;/script&gt; </code> <p>And just before the <kbd>&lt;/body&gt;</kbd> tag:</p> <code> &lt;script type=&quot;text/javascript&quot;&gt;<br /> &lt;!--<br /> initialize();<br /> //--&gt;<br /> &lt;/script&gt; </code> <p>Where <kbd>intialize()</kbd> is a method that will set up my page, and the funky comment lines are so that older browsers don't just print the text on the page.</p> <p>So now, we dig a little deeper. The <kbd>initialize</kbd> function will look something like this.</p> <code> var selectedHash = '';<br /> <br /> function initialize() {<br /> &nbsp;&nbsp;&nbsp;&nbsp;var currentHash = document.location.hash;<br /> <br /> &nbsp;&nbsp;&nbsp;&nbsp;window.setInterval(function () {<br /> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if(selectedHash != currentHash) {<br /> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;doSomethingWithHash(currentHash);<br /> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;selectedHash = currentHash;<br /> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}, 500);<br /> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br /> &nbsp;&nbsp;&nbsp;&nbsp;}<br /> <br /> </code> <p>So a few important things. There is a global variable <kbd>selectedHash</kbd> that does not go away, and is used as a reference to what is actually goin on in the page. Also, there is an inline function in <kbd>setInterval()</kbd>. You can call a function reference instead, but for a simple function like this, it is much easier to read the source. Then, you might notice I picked an interval of 500 milliseconds. This is twice a second, very often for a script to run. Normally, this could be very bad, but the choice we make is to run often, to catch user actions (specifically the back button, which changes the hash), and users don't like waiting very long at all. The effect is harly noticeable.</p> <p>So, what does it look like in action? Well I updated my portfolios to reflect this. Check out going to <a href="http://zachmargolis.com/web/">/web/</a> and even <a href="http://zachmargolis.com/web/#colours">/web/#colours</a> to see how this Javascript can also allow for the right section of a page to be presented immediately through Javascript. If you look at the source, you may notice that I use slightly different functions in my scripts at the bottom of the page, but the result is almost exactly the same as these sample scripts.</p> <p>Tags: internet,ramblings,site update,</p> http://www.zachmargolis.com/archive/65 http://www.zachmargolis.com/archive/65 Link Styles Thu, 20 Nov 2008 12:23:04 MST <p>I happened to come across a blog today, <a href="http://www.iliveonyourvisits.com/">iliveonyourvisits.com</a>, and I really dig the style. The links are highlighted, not underlined, and have a really obvious “hover” state, so you know when you've moused over them. This is slightly unconventional, but makes a lot of sense. I think underlinining links is nice, but it might be too subtle. In print, people use underlining for emphasis, but on the web we‘re not really allowed to, because that would be confusing.</p> <p>The coolness of highlighted links is compounded by the fact that highlighting links doesn't clash with anything else. Sure, you might think, “Well what if I want to print out and highlight an article that has links in it? Will that overlap?” Well it could be confusing, but if your print stylesheet hides the highlighting, when a page is printed, there won't be any links. It's not like hyperlinks are useful on the printed page, so that would actually be an amazing degradation.</p> <p>What's more is that you could turn links into footnotes, since links and footnotes are essentially analogous. I'm not saying they're the same, but they're closely related. With a little bit of thinking ahead, you could add a superscript number using CSS after every link, and then put the link's address at the bottom of a page with that same number, just like a real footnote. This would be very functional. The one snag is that currently, print styles are not supported very well across browsers, but of course, in the future that will not be a problem. The future fixes everything, duh.</p> <p>But basically, highlighted links are really cool. Using media-specific stylesheets, we can make them fit in their most natural way, like as big flashy link on an interactive web page, or simple footnotes used for reference in print. For the next revision of my site, I think I'll try to implement those kinds of links.</p> <p>Tags: internet,ramblings,</p> http://www.zachmargolis.com/archive/66 http://www.zachmargolis.com/archive/66 Making Toast Thu, 04 Dec 2008 00:04:57 MST <p>So I got a new toaster this year. It's great. I love it...when I'm paying close attention.</p> <div class="caption"> <img src="/img/blog/67/burniness.jpg" alt="Burniness VS Time" /> Burniness of Toast VS Time </div> <p>So, as you can see, there's an ideal level of burniness. However, it's somewhere between &ldquo;completely toasted&rdquo; and &ldquo;not toasted at all.&rdquo; Basically, I have to watch this toaster vigilantly and wait for the precise moment when the toast is golden and crunchy. Also, I'm proud of my new word, burniness.</p> <p>Tags: life,</p> http://www.zachmargolis.com/archive/67 http://www.zachmargolis.com/archive/67 Upcoming Changes Fri, 26 Dec 2008 21:28:02 MST <p><p>So I'm working on an update to my website. For those counting at home, yes, this is the fourth redesign in a little over a year. The last major rehaul was in February or so, and I think the design has held up fairly well. I'm ready for something really fresh and exciting, and this new design takes a completely new direction.</p> <p>There have been a few things on my mind during the design/prototyping phase of this new look. One is the theme&mdash;this next theme is column-based, and almost entirely composed of text. The only image is the background one, and I'm considering actually going for a background color instead. That cuts down on downloads, and on <abbr title="Hypertext Transfer Protocol">HTTP</abbr> requests, which goes a long way in terms of just making the page feel faster to more people.</p> <p>Another choice I'm making is to use slightly unconventional link styles. Just like I blogged about, I'm using highlighter-style background colors, and no underlining. I then used a <abbr title="Cascading Stylesheets">CSS<abbr>3 selector that allows me to separate external links (ones to other websites) from internal ones, and I specified a different cursor for those. Some people put little globes next to those links, or other little icons, but then they're just inserting images into their text. I think the advantage of this cursor-based system is that on a mouse-based system, visitors will be able to learn which links leave my site and which do not. On systems without mice, like phones, and even on older browsers, there is no significant loss, which makes this a <a href="http://www.alistapart.com/articles/understandingprogressiveenhancement">progressive enhancement</a>. <p>Also, I'm significantly trimming the navigation. I'm going to have one portfolio page for only my web work, and get rid of the About page. The About page is not exactly useful, and I've built a small footer that has all the important stuff to replace it. I don't need a separate page just for my two-line description of myself.</p> <p>Some people might think that I redesign my web page more often that necessary. I would disagree because I am always finding out better ways to design the layout, better ways to write the code, and better ways to optimize download times. Besides, it's a lot of fun just to buckle down and work on my own site in between working for other people.</p> <p>So keep your eyes/feed readers peeled for the next redesign, I hope that it turns out to be a good improvement.</p></p> <p>Tags: ramblings,site update,</p> http://www.zachmargolis.com/archive/68 http://www.zachmargolis.com/archive/68 Crazy Apartment in Hong Kong Fri, 16 Jan 2009 00:31:31 MST <p><blockquote><p>The wall units, which are suspended from steel tracks bolted into the ceiling, seem to float an inch above the reflective black granite floor. As they are shifted around, the apartment becomes all manner of spaces — kitchen, library, laundry room, dressing room, a lounge with a hammock, an enclosed dining area and a wet bar.</p></blockquote> <p>I wish I had this guy's <a href="http://www.nytimes.com/2009/01/15/garden/15hongkong.html?_r=2&th&emc=th">24-in-1 apartment</a> Hong Kong. I've always thought that super compact living situations were really cool.</p> <p>That said, I might get tired of rearraning the entire space every time I want to eat or sleep. Still, it just looks awesome.</p></p> <p>Tags: life,</p> http://www.zachmargolis.com/archive/69 http://www.zachmargolis.com/archive/69 I Can Use Photoshop Sat, 17 Jan 2009 22:32:46 MST <p> <p>As part of the <a href="http://technoculture.ucdavis.edu">Technocultural Studies</a> program at UC Davis (my &ldquo;major&rdquo;), we are required to take weekend seminars in things like Photoshop. So I received the list of tasks to be completed for credit, and decided to just get them done.</p> <p>The big, tie-it-all-together assignment was:</p> <blockquote><p>Create a mock magazine cover that is geared toward a demographic of Northern Californians in their early 20's. Your magazine cover should express a critical view of the role of technology in advertising</p></blockquote> <p>So I present my mock magazine, Blueprint. A Google search reveals that the name had at one point been used by an architecture magazine, but they shut down. Free for the taking! Maybe it's a little light on the criticism, but I had fun nonetheless.</p> <div class="caption"> <img src="/img/blog/70/magazine.jpg" alt="Blueprint Magazine" /> <div>Mock Magazine Cover</div> </div> </p> <p>Tags: arts,projects,school,</p> http://www.zachmargolis.com/archive/70 http://www.zachmargolis.com/archive/70 The Third Dimension Sun, 01 Feb 2009 14:58:59 MST <p><p>3D is a great buzzword. So you'd think 3D movies and TV would be a great thing, like holograms and transporters. However, I think that history has shown 3D won't ever become truly popular.</p> <p>There's always some new 3D tech that claims to be super realistic, and this year's Superbowl has <a href="http://www.engadgethd.com/2009/02/01/sobes-3d-super-bowl-commercial-available-now-on-youtube-hd/">3D Commercials</a>. While the video doesn't seem ridiculous viewed without glasses, that fact that you still need to buy glasses is a problem.</p> <p>At <abbr title="Consumer Electronics Show">CES</abbr> in Las Vegas this year, 3D was super trendy. Lots of TVs with built-in 3D, and games like Guitar Hero were modded to have 3D aspects to demonstrate the new 3D specs. I can't say that makes me excited. I remember a trendy 3D dinosaur game back on my grandpa's computer (roughly the early/mid 90')s, and it wasn't a very fun experience.</p> <p>The glasses are the Achilles' heel of 3D. The glasses for TV shows and Superbowl ads are all disposable, so (go figure) people dispose of them when they're done. In an imaginary world where 3D really hits it big, would people really go out of their way to more permanent ones? I vote no. If you wear perscription glasses, then 3D glasses are still just a hassle.</p> <p>One possible solution would be high adoption of 3D TVs, without glasses. These 3D TVs basically show viewers multiple separate images at the same time by basically vertically striping them. Depending on your angle from the TV, you see different vertical stripes, and then a 3D angle. Sure, in the case that every home in America gets one of these, 3D will have really caught on.</p> <p>But not so fast&mdash;two other trends claimed to be able to revolutionize regular old American TV viewing: digital TV, and High Definition TV. They've both lagged a lot in adoption. The Digital TV switchover was mandated by the US Government, and has been hitting some snags as the blackout date approaches. Something on the order of 7% of people are completely unprepared (source: <a href="http://www.engadgethd.com/2008/11/12/number-of-digital-tv-ready-homes-jumped-in-october/">Engadget</a>, and a number of small stations are not prepared either. As for HDTV, adoption is accelerating, but even the most generous numbers would put it at 25% of American households. This is a significant number, but still, that means at least three out of four households <em>do not</em> have an HDTV.</p> <p>So if Digital and HDTV have had such lackluster attach rates, why on Earth would 3D be any better? Either route that 3D takes, glasses or no glasses, it will be met with too much resistance. I think that 3D is a nice gimmick, but I sincerely doubt that it will ever be a regular part household entertainment.</p></p> <p>Tags: life,ramblings,</p> http://www.zachmargolis.com/archive/71 http://www.zachmargolis.com/archive/71 Working in Maya Thu, 26 Feb 2009 12:07:40 MST <p><p>I'm taking a class in Maya this quarter, <a href="http://www.cs.ucdavis.edu/~neff/teaching/tcs130w09/index.html">TCS 130</a> with <a href="http://www.cs.ucdavis.edu/~neff/">Professor Neff</a>. We've been working for something like six or seven weeks now, but I haven't made anything show-worthy yet. Now I have, so I'm going to present my scene: &ldquo;Vegetables at Sunset.&rdquo; Click on each image to view it in higher definition.</p> <div class="caption"> <a href="/img/blog/72/vegetable_scene1_lg.jpg"><img src="/img/blog/72/vegetable_scene1_sm.jpg" alt="Vegetables at Sunset" /></a> <div>Long shadows at sunset.</div> </div> <div class="caption"> <a href="/img/blog/72/vegetable_scene2_lg.jpg"><img src="/img/blog/72/vegetable_scene2_sm.jpg" alt="Vegetables at Sunset" /></a> <div>I just really like this one, it really feels like a sunset.</div> </div> <div class="caption"> <a href="/img/blog/72/vegetable_scene3_lg.jpg"><img src="/img/blog/72/vegetable_scene3_sm.jpg" alt="Vegetables at Sunset" /></a> <div>Notice the subtle depth-of-field effect.</div> </div> <p>So, why vegetables? The professor kidded that everybody makes fruits for simple art projects (the classic &ldquo;paint a bowl of fruit&rdquo; assignment), so they must be too easy, and we should do vegetables. Technically, pumpkins and eggplant may be fruits, but we&rsquo;ll let that slip.</p></p> <p>Tags: arts,portfolio,school,</p> http://www.zachmargolis.com/archive/72 http://www.zachmargolis.com/archive/72 Facial Animation Mon, 16 Mar 2009 18:07:50 MST <p><p>Here&rsquo;s my latest project in Maya, a short animation that includes at least four different facial expressions, with transitions between them. I put some late hours into this one, and I think it was worth it.</p> <div class="caption"> <a href="/img/blog/73/diver_movie.mp4"><img src="/img/blog/73/diver_demo.jpg" alt="Facial Expressions Demo" /></a> <div>Click to play. Compressed as h.264</div> </div> <p>Bonus points for naming all four facial expressions.</p></p> <p>Tags: portfolio,school,</p> http://www.zachmargolis.com/archive/73 http://www.zachmargolis.com/archive/73 Nailed it. Fri, 24 Apr 2009 19:25:45 MST <p><p><a href="http://jasonsantamaria.com/articles/what-the-world-needs/">Jason Santa Maria</a> nails the exact feel I had been going for with my website, but like, better. By a lot. This feeling that I have, it's like something was on the tip of my tongue, and he blurted it out before I could (and with more style).</p> <p>So naturally, that means back to the drawing board for me.</p></p> <p>Tags: internet,</p> http://www.zachmargolis.com/archive/74 http://www.zachmargolis.com/archive/74 Python Mon, 25 May 2009 19:29:17 MST <p><p>After a few weeks in <a href="http://heather.cs.ucdavis.edu/nm.html">Professor Matloff&rsquo;</a> ECS 145 class, &ldquo;Scripting Languages&rdquo; I need to declare to the world that the <a href="http://python.org">Python programming language</a> is a pretty remarkable language.</p> <p>I like the simple, approachable syntax: the lack of braces and semicolons makes the source easy on the eyes. I also like how Python has more of a direction than say, <abbr title="PHP: Hypertext Preprocessor">PHP</abbr>. What I mean is that the functions are all named with the same conventions. I like that most of the built-in methods are easily recognizeable like <kbd>__init()__</kbd>, and <kbd>__str()__</kbd>. This way, I know what they are, and where they are used. <abbr title="PHP: Hypertext Preprocessor">PHP</abbr> can&rsquo;t even pretend that it has a consitent naming scheme for its functions. To me, <abbr title="PHP: Hypertext Preprocessor">PHP</abbr> appears to lack this direction, and has evolved into a sloppy language.</p> <p>Performance-wise, Python is supposed to be right up there with <abbr title="PHP: Hypertext Preprocessor">PHP</abbr>, so in the next iteration of this website, I think I&rsquo;d like to implement a Python back end.</p></p> <p>Tags: life,school,</p> http://www.zachmargolis.com/archive/75 http://www.zachmargolis.com/archive/75 Summer Blog Mon, 22 Jun 2009 11:41:45 MST <p><p>So, for the summer, I&rsquo;m going to try out a <a href="http://www.tumblr.com">Tumblr</a>, so that I can more easily upload pictures and what-not to my blog while on the go in Japan. Check out <a href="http://summer09.zachmargolis.com/">summer09.zachmargolis.com/</a> to keep track of what shenanigans I post.</p></p> <p>Tags: life,trip,</p> http://www.zachmargolis.com/archive/76 http://www.zachmargolis.com/archive/76 New URL Fri, 18 Dec 2009 22:56:24 MST <p><p>Welcome to the new zachmargolis.com! Wait, huh? &ldquo;<em>The site is exactly the same as it has been for the past six months!</em>&rdquo; you may be thinking. <em>Au contrare</em>: I had a brief, fleeting moment of genius and realized that <a href="http://xn--rxam.com">http://&#918;&#924;.com</a> was available.</p> <p>But so what? &ldquo;<em><a href="http://xn--rxam.com">http://&#918;&#924;.com</a> is just another two-letter domain name!</em>&rdquo; you might say. Again, not quite. <a href="http://xn--rxam.com">http://&#918;&#924;.com</a> is actually Zeta-Mu, two Greek letters smashed together followed by a dot-com. Get it? In reality, the domain that I bought is <a href="http://xn--rxam.com">http://xn--rxam.com</a>, also known as <a href="http://xn--rxam.com">http://&#950;&#956;.com</a>. So now, I can be like some of the <a href="http://daringfireball.net">big names of bloggerdom</a> and have my own personal short <abbr title="Universal Resource Locator">URL</abbr>s.</p> <p>This is only the beginning! More to follow!</p></p> <p>Tags: internet,site update,</p> http://www.zachmargolis.com/archive/77 http://www.zachmargolis.com/archive/77