The great "little things"

2

Comments

  • Reply 21 of 42
    Quote:

    Even when it?s sleeping, iMac thinks about what?s best for you. In low-light environments, a sensor detects the room?s ambient light and adjusts the sleep light to match ? so you and your iMac G5 can both catch some Zs.



    LOL I whish my Airport Express did that,it baths the room at night in a creepy green light that shines on my face
     0Likes 0Dislikes 0Informatives
  • Reply 22 of 42
    Hold shift while changing the volume of an embedded QuickTime window to turn it up to... like... 20 or something. Way beyond 11, at least.



    Good for those too-quiet videos.
     0Likes 0Dislikes 0Informatives
  • Reply 23 of 42
    placeboplacebo Posts: 5,767member
    I can click Private Browsing in Safari and look at all the porn I want and be able to close the window and skip off to the bathroom without having to delete history or reset the browser! It's awesome!



     0Likes 0Dislikes 0Informatives
  • Reply 24 of 42
    placeboplacebo Posts: 5,767member
    Hold down shift to scroll horizontally if this hasn't been covered.
     0Likes 0Dislikes 0Informatives
  • Reply 25 of 42
    when debugging UI code, and you need to get a backtrace from a mouse tracking loop in a section of code you don't know, in a language you'd rather not be programming in, open terminal, type "sleep 5 && gdb attach [process id]" -- then, click on the UI element to debug, and keep the mouse down. when sleep 5 finishes sleeping for 5 seconds, gdb will attach to pid, and halt execution of the process, then, from the terminal, type bt - and you get a backtrace from the mouse tracking loop! from there you can set relevant breakpoints, and just investigate those bugs away!!!



    too bad there's no shortcut
     0Likes 0Dislikes 0Informatives
  • Reply 26 of 42
    Quote:

    Originally posted by grad student

    when debugging UI code, and you need to get a backtrace from a mouse tracking loop in a section of code you don't know, in a language you'd rather not be programming in, open terminal, type "sleep 5 && gdb attach [process id]" -- then, click on the UI element to debug, and keep the mouse down. when sleep 5 finishes sleeping for 5 seconds, gdb will attach to pid, and halt execution of the process, then, from the terminal, type bt - and you get a backtrace from the mouse tracking loop! from there you can set relevant breakpoints, and just investigate those bugs away!!!



    too bad there's no shortcut




    im not a programmer, and im actually rather curious what tha means hehe. care to write that in plain english? =)
     0Likes 0Dislikes 0Informatives
  • Reply 27 of 42
    Quote:

    Originally posted by stedwick

    im not a programmer, and im actually rather curious what tha means hehe. care to write that in plain english? =)



    woa... here goes: these days, programs are written as a collection of functions. functions can call other functions. so - if it were algebra, we could say for example:



    f(x) = 2*g(x)

    g(x) = x + 5



    f(x) and g(x) are functions, and f(3) = 2*g(3) = 2*( 3 + 5 ) = 2 * ( 8 ) = 16



    so... as a program runs, if you were to halt it at any given point, there would be a state the program was in... and the backtrace would show you part of that state - aka "the call stack". so in the example above, if you halted execution before the (3+5) were added in the function g(x), the backtrace would look something like:



    #0 0x9000ba40 in g ()

    #1 0x02ab3798 in f ()



    thats pretty much everything there is to programming.



    i mean, there is a progression of course. well, until it gets all complicated with things like object oriented programming, and c++. at that point the young developer becomes bewildered and excited, only to find out later that c++ is an inelegant kludge and a weak attempt at an object oriented language upon discovering objective-c and message passing. things go well for a while in this new found dynamic heaven. the programmer starts sending messages to all the time. sometimes he even sends messages to self. its great, there is less typing to do, and he feels young. he even strikes up smalltalk with other programmer objects.



    sadly, the programmer has to feed himself, and so he gets a job and ends up coding in C++ again; all the while the programmer yearns for the loosely typed dynamic OO bliss of objective-c. this works out for a while, but as they say, curiosity killed the cat. again the utopian world the programmer reached for in objective-c is crushed, tarnished, and spoiled with the realization that messaging passing and object oriented programming is a bottleneck of expression that can only be understood when one breaks out in a cold sweat, develops a lisp, and starts screaming about how functions should be generic. sanity slowly slips away, until one day, in a drunken lump on the floor, he refuses to say anything without a common lisp. he is happy in this state, and peaceful - though jealous of how short his neighbor haskel can describe a qsort.



    5 years later he's found dead next to a ][e running turtle graphics. the whole thing is just sad really.
     0Likes 0Dislikes 0Informatives
  • Reply 28 of 42
    Quote:

    Originally posted by grad student



    WOAH.
     0Likes 0Dislikes 0Informatives
  • Reply 29 of 42
    lundylundy Posts: 4,466member
    Quote:

    Originally posted by stedwick

    im not a programmer, and im actually rather curious what tha means hehe. care to write that in plain english? =)



    gdb is the GNU Debugger, a companion to gcc and the rest of the GNU open-source apps. Comes with Xcode and is installed with the Developer Tools.



    He's saying if there is an app that you need to debug and you don't know where in the app the code is for a certain UI element, you can use this trick to make the debugger go there. As soon as the debugger "attaches" to a running app, it will break into the debugger and you can look at memory, registers, what called this routine, what called the one that called this one, etc.



    I have my own app called Jumble Helper (to solve the Jumble puzzle in the newspaper) and I just tested it:



    "sleep 5 && gdb attach 1126" is what I just typed to do this. I found the number 1126 (the Process ID or PID of Jumble Helper) in the leftmost column of Activity Monitor after launching Jumble Helper.



    The command makes the BSD shell sleep for 5 seconds, giving you time to switch to the app and press the mouse on some UI element. Then the debugger kicks in and stops the specified app (1126, Jumble Helper) in the middle of the code that is handling the mouse action on that UI element.



    Pretty neat.
     0Likes 0Dislikes 0Informatives
  • Reply 30 of 42
    Quote:

    Originally posted by lundy

    gdb is the GNU Debugger, a companion to gcc and the rest of the GNU open-source apps. Comes with Xcode and is installed with the Developer Tools.



    He's saying if there is an app that you need to debug and you don't know where in the app the code is for a certain UI element, you can use this trick to make the debugger go there. As soon as the debugger "attaches" to a running app, it will break into the debugger and you can look at memory, registers, what called this routine, what called the one that called this one, etc.



    I have my own app called Jumble Helper (to solve the Jumble puzzle in the newspaper) and I just tested it:



    "sleep 5 && gdb attach 1126" is what I just typed to do this. I found the number 1126 (the Process ID or PID of Jumble Helper) in the leftmost column of Activity Monitor after launching Jumble Helper.



    The command makes the BSD shell sleep for 5 seconds, giving you time to switch to the app and press the mouse on some UI element. Then the debugger kicks in and stops the specified app (1126, Jumble Helper) in the middle of the code that is handling the mouse action on that UI element.



    Pretty neat.




    also try ps -ax | grep -i "app name" to find the pid of your app quickly
     0Likes 0Dislikes 0Informatives
  • Reply 31 of 42
    haha thats pretty cool stuff. i did some programming back in high school for the computer science AP, and only recently got back into programming now that ive discovered skilljam.com and that i can program the computer to play those games a lot better than i can lol.



    (ps i found a site where some guy programmed the comp to play tetris and the game went for 186 hours and the comp cleared 7,000,000 lines lol!)



    so, whats so great about objective-c? as the guy said above, i thought c++ was cool, but i guess im missing out on bigger and better things!!
     0Likes 0Dislikes 0Informatives
  • Reply 32 of 42
    Quote:

    Originally posted by stedwick

    haha thats pretty cool stuff. i did some programming back in high school for the computer science AP, and only recently got back into programming now that ive discovered skilljam.com and that i can program the computer to play those games a lot better than i can lol.



    (ps i found a site where some guy programmed the comp to play tetris and the game went for 186 hours and the comp cleared 7,000,000 lines lol!)



    so, whats so great about objective-c? as the guy said above, i thought c++ was cool, but i guess im missing out on bigger and better things!!




    objective-c(++) is cool because the compiler throws less information away, and that information is available at runtime, and, objective-c is a truly dynamic object oriented language; and, it lets you leverage C (and C++) libraries, and the syntax consists of simple and clean extensions to C, and you can do all kinds of introspection, method forwarding, and dynamic changes to the runtime.



    C++ is a static object oriented language, with overly strong type-checking, a vomit inducing syntax, and requires hacks like templates to generalize algorithms (which results in code bloat, and prevents integration of new types at runtime. it is admittedly fast, however - these days i'd argue that a program will be faster if the language used to write it gives the programmer more time to optimize it; vs. the language being fast itself but slowing the programmer down - in the future this will only be more true.



    now, objective-c is quite cool, however, python, and ruby are much cooler, and lisp is the language to end all languages (and its fast). see www.paulgraham.com and read the articles on lisp...
     0Likes 0Dislikes 0Informatives
  • Reply 33 of 42
    sekiosekio Posts: 150member
    For some reason, it you hold the control key and minimize an app, the genie effect goes slower. Does't work with iTunes though.
     0Likes 0Dislikes 0Informatives
  • Reply 34 of 42
    Quote:

    Originally posted by Sekio

    For some reason, it you hold the control key and minimize an app, the genie effect goes slower. Does't work with iTunes though.



    If you use the SHIFT button it does!



    SHIFT also slows down Expose actions, it's called the Expose 'show-off' trick



    http://www.apple.com/pro/tips/expose2.html
     0Likes 0Dislikes 0Informatives
  • Reply 35 of 42
    sekiosekio Posts: 150member
    Haha, that is so useless. I just thought it was a bug or something.



    However, with minimizing shift makes it go very slow and control just makes it go a little bit slower than normal.
     0Likes 0Dislikes 0Informatives
  • Reply 36 of 42
    cesarcesar Posts: 102member
    typing ">console" in the login window and work in Macos X without a GUI.
     0Likes 0Dislikes 0Informatives
  • Reply 37 of 42
    Quote:

    Originally posted by grad student

    woa... here goes: these days, programs are written as a collection of functions. functions can call other functions. so - if it were algebra, we could say for example:



    f(x) = 2*g(x)

    g(x) = x + 5



    f(x) and g(x) are functions, and f(3) = 2*g(3) = 2*( 3 + 5 ) = 2 * ( 8 ) = 16



    so... as a program runs, if you were to halt it at any given point, there would be a state the program was in... and the backtrace would show you part of that state - aka "the call stack". so in the example above, if you halted execution before the (3+5) were added in the function g(x), the backtrace would look something like:



    #0 0x9000ba40 in g ()

    #1 0x02ab3798 in f ()



    thats pretty much everything there is to programming.



    i mean, there is a progression of course. well, until it gets all complicated with things like object oriented programming, and c++. at that point the young developer becomes bewildered and excited, only to find out later that c++ is an inelegant kludge and a weak attempt at an object oriented language upon discovering objective-c and message passing. things go well for a while in this new found dynamic heaven. the programmer starts sending messages to all the time. sometimes he even sends messages to self. its great, there is less typing to do, and he feels young. he even strikes up smalltalk with other programmer objects.



    sadly, the programmer has to feed himself, and so he gets a job and ends up coding in C++ again; all the while the programmer yearns for the loosely typed dynamic OO bliss of objective-c. this works out for a while, but as they say, curiosity killed the cat. again the utopian world the programmer reached for in objective-c is crushed, tarnished, and spoiled with the realization that messaging passing and object oriented programming is a bottleneck of expression that can only be understood when one breaks out in a cold sweat, develops a lisp, and starts screaming about how functions should be generic. sanity slowly slips away, until one day, in a drunken lump on the floor, he refuses to say anything without a common lisp. he is happy in this state, and peaceful - though jealous of how short his neighbor haskel can describe a qsort.



    5 years later he's found dead next to a ][e running turtle graphics. the whole thing is just sad really.




    Just had to quote it all! Like stedwick - while I only just got the gist of it - and while this is hardle a "little thing" lol - it was really fun to read. Whatever it was :P



    For some reason, I feel if you had a blog with RSS, I'd subscribe!
     0Likes 0Dislikes 0Informatives
  • Reply 38 of 42
    i'll keep you posted. i've got a blog and a whole lot more on the way in 2006.
     0Likes 0Dislikes 0Informatives
  • Reply 39 of 42
    Probably in all cocoa programs you can click command plus or command minus to enlarge or shrink the font size of the text. This works in Mail and Safari.



    In System Preferences open Universal Access and select Zoom on. In the options set it to move when the cursor reaches an edge.



    Now you can zoom the screen at any time with command option plus. This works really nicely. It is a great way to enlarge QT movies. Enlarging QT movies this way provides a much higher frame rate than if you double the size of the movie in QT itself.



    If you are giving a presentation using a low rez projector this is a good way to zoom in on a part of the screen for added clarity.
     0Likes 0Dislikes 0Informatives
  • Reply 40 of 42
    Quote:

    Originally posted by Bouba

    command-space to activate spotlight

    type your the name of the app you want to open

    command-enter will select the top hit and launch it.



    voilÃ*! a very fast launcher! ;-)




    Not so fast when you have terabyte of storage.
     0Likes 0Dislikes 0Informatives
Sign In or Register to comment.