Mac Switchers: How to Enable Tabbing to Combo Boxes

by Josh Tynjala

One thing I could never understand about my Mac is why I couldn’t use the keyboard to switch to combo boxes in forms on the web. For example, when I buy something online, I generally need to enter my shipping address. First, I type in my name, street address, and city. I press the Tab key to switch between each field. Next, I need to enter my state, so I press Tab…. Oops! It went straight to ZIP code and skipped the State field. What the hell?

Coming from a Windows world, I’m used to keyboard tabbing that goes between every field in a webpage or application window. It turns out that Mac users do what they do best (think differently) in regards to this user interaction. By default, keyboard tabbing only moves between “text boxes and lists only”. How strange.

As I happily discovered today, there is a setting hidden deep in the System Preferences that allows you to change this behavior. Here’s what you need to do:

  1. Open up System Preferences.

  2. Choose Keyboard & Mouse under the Hardware group.

  3. Go to the Keyboard Shortcuts page.

  4. At the very bottom where it says “Full Keyboard Access” change the radio button from “Text boxes and lists only” to All controls.

Thankfully, that’s one of the last things about my Mac that I still had to work around. Now if only I didn’t have to work around all sorts of new things when I need to go back to Windows! I hope this post helps someone else who finds it strange that tabbing is so limited by default on Mac OS X.

Five Ways to Become a Better Software Developer

by Josh Tynjala

For a while now, I’ve wanted to put together a collection of tips for up-and-coming software developers. I’m talking about talented guys and gals who dream of working on more exciting projects and maybe getting a little recognition. Not entirely sure how to go from code monkey to code ninja? I don’t have all the answers, of course, but each of these suggestions has personally helped me improve my career and discover other talented people that were definitely worth meeting.

Contents

  1. Write Code For Fun

  2. Study Software Architecture and Design Patterns

  3. Start a Blog

  4. Join a Community

  5. Keep Yourself Motivated

Write Code For Fun

For some software developers, coding only happens at the office. Once they step away from their desk, they won’t touch a compiler until tomorrow or after the weekend. On the other hand, many of the most successful developers I know write a little bit of code at home too. Some contribute to open source projects. Some simply build the occasional little utility for themselves. Some actually build something cool enough to become a product and make the developer a little extra money. Whatever the focus, side projects like these are a great way to explore interesting ideas and to learn new skills without all the deadlines and politics you deal with every day at work.

Obviously, you don’t need to make spend every night coding. By all means, have a social life. However, if you find yourself sitting on the couch in the middle of the week with nothing to do, brainstorm a project idea that you’ll find exciting and challenging.

Fun Side Project Ideas
  • Use some libraries or APIs you’ve been itching to play with, but never had a reason to use in your everyday work.

  • Create a new application or extension to an existing app that will help you get something done faster.

  • Design a fun little game. Maybe make some money on it.

  • Try to build something you’ve never seen anyone do with your technology-of-choice before.

  • If all you know are web apps, switch it up, and learn how to write a compiler or an operating system kernel.

  • Try to learn a new programming language.

Be ambitious. Stretch your limits. It’s okay if you fail. You’ll learn something no matter what the result.

For me, personally, coding in my free time has been the best way to learn anything about software development and various technologies. I jump into new frameworks, APIs, and technologies headfirst and come out with greater knowledge that helps me a thousand times over on the things I actually get paid to do. My co-workers often say “let’s ask Josh” when they run into trouble because they know I’ve spent a lot of time digging into a wide variety of features. In many cases, I’ve already discovered a bunch of quirks and bugs that they might run into, and I can often share workarounds so that they won’t get stuck for hours figuring it all out themselves like I had to do.

Though I never get paid directly for the time I spend on fun side projects at home, I’ve found that the skills and knowledge I gain on these sorts of projects earn me better rewards in the long run.

Back to Top

Study Software Architecture and Design Patterns

Beautiful code is useful, reusable, extensible. Strive to make the quality of your code better as your progress through your career. Figure out how to make functions and classes more generic. Find ways to make your code more extensible so that other developers can create custom functionality easily without changing the internals. Discover and experiment with new ways to get the same tasks done to figure out if you can do something better.

One good way to improve the quality of your code is to look at code written by other developers. Check out the code other members of your team have written. If you find something interesting or confusing, go over to their desk and ask about it. Your co-worker will probably enjoy knowing that you’re interested in his or her work, and you’ll learn something in the process. Alternatively (no, additionally!), look at the source code for prominent open source projects, and try to figure out how they work behind the scenes. I like to look at code from libraries and frameworks that I use in my daily work because I intimately know the input and output of many of the APIs already. If you’re feeling confident, see if you can improve any of the code, fix a bug, or add a new feature. One of the best ways to learn is to get your hands dirty and do some real work.

Likewise, you should let other developers look at your code and provide suggestions. As you probably know, in a professional environment, this is called code review. Allow them to ask questions and make critiques. Don’t be afraid of someone telling you that something in your module isn’t the best it could be. It’s easy to feel defensive about something that’s taken a lot of hard work, especially if you feel proud of how it turned out. I like to think about it this way: if my code isn’t the best it could be (most importantly, if it has bugs), I’d rather get it working properly now than to have a disgruntled user complain about its problems later. Even worse, they might give up completely and fail to tell me about what went wrong! Mistakes happen. Acknowledge that something isn’t perfect, and when you fix something after receiving a bug report, be happy that you have one less thing to worry about in the future.

Consider learning about design patterns. A design pattern is a commonly accepted way to structure your code to solve a type of software engineering problem. They don’t provide the complete solution with everything finished for you. Instead, they describe a more generic architecture that applies to multiple problems that have similar requirements. Generally, development frameworks are the best place to find extensive use of design patterns. Often, frameworks use patterns to help developers structure projects in a more standardized and efficient way. Additionally, their use of patterns help to decouple parts of a project so that future changes have a less impact across the entire codebase. Many teams like to use a single framework from one project to the next because it helps the developers become productive faster both when starting new projects and maintaining existing projects.

Back to Top

Start a Blog

You know all those cool little projects and experiments you’ll soon be building in your free time? Consider starting a blog where you can share that stuff with others. Blogs don’t just have to be diaries about the mundane details of your life. For many successful developers, a blog’s content can be as effective as a resume. I can’t tell you how many hiring managers have mentioned that they enjoyed reading a few of my recent blog posts. A blog with excellent descriptions of technical concepts, source code samples that follow best practices, and explain things in casual and friendly tone can be a strong supplement to help an interviewer evaluate a job candidate.

Allow people to comment on your blog posts. Be the person that starts (or continues) a great conversation. Don’t be afraid of feedback or criticism. Everyone learns by making mistakes. My Composition teacher from my freshman year in college once explained that the best essays tend to have the most red-ink feedback in the margins. Not the worst ones. He explained that if you get constructive feedback from someone, its generally because they like what you’ve created, and they see value in helping you improve it.

A Few Blog Post Ideas
  • Share some clever code or a useful class you wrote, and explain how it helped you solve a difficult or normally tedious problem. If it helped you get something done easier or faster, it’s likely that other people can benefit from it too.

  • Talk about the process you used to implement a project from beginning to end. Tell your audience what worked and what could be improved the next time you need to build something like that. Everyone wants to get their work done faster and more smoothly. Learning about the challenges another person has faced is a great way to be prepared for the future.

  • Has a company relevant to your field announced a useful (or useless) new product or service, or has a prominent industry leader said something very controversial? Share your own opinion on the subject. Do not write a “me too” post that’s only a paragraph long just to link to another blog or website. Collect your thoughts and contribute to the conversation by writing a response to the news from your unique perspective. You may discover that all those lame “me too” posts start linking to your blog as well.

In short, focus on creating useful content that will help others or provide relevant information that they may not find anywhere else. If you put useful information out there, people will find it and then come back for more.

Back to Top

Join a community

Whether we’re talking mailing lists, user groups, conferences, or some other venue, developer communities spring up anywhere and everywhere. These communities can provide awesome ways to improve your skills by learning from others, to help others by sharing your own expert knowledge, and to meet like-minded developers that may become friends, colleagues, and a part of your growing professional network.

Though the least personal, mailing lists and forums are a great way to take a first step into participating in a technology community. While blogs are a bit more monolithic with a single source of discussion topics and shorter conversations (if any), forums and mailing lists produce more longer-term discussion on a wider variety of topics. In general, things are informal, and a lot of discussion (depending on the community, of course) starts from someone having a problem and looking for advice. In more active communities, discussions about frameworks, best practices, and new techniques for solving problems can grow to hundreds of messages and provide a wealth of real-world experience.

Conferences often give you access to a national or even worldwide community of people working with your technology of choice. They provide you with opportunities to travel, to meet prominent bloggers and community leaders, and to have a good time while staying relevant to work. They can be expensive, though, so you’ll often have to ask your employer to pay for your trip, and they’ll expect you get more out of the experience than personal networking. They want to know that their investment helped you learn something that will benefit their business. Your best bet for learning, especially if you’re like me and you already stay up-to-date on the latest and greatest through blogs and other online sources, is to go to sessions that cover technologies or features you don’t normally use or to focus on sneak-peek type sessions where something is being introduced for the first time.

If you’d rather stay near home, or if you don’t have the budget for a big conference, consider joining a local user group. These small city- or region-based communities generally offer free monthly meetings where developers can get together for a few hours chat about tech. There’s often a presentation by a group member or a visiting professional on topics similar to those found in conference sessions, followed by some informal discussion that may meander to a wide-variety of topics. After the meeting, everyone may go out for a couple beers and continue chatting about the tech they love. It’s a great way to find work, look for new employees, and learn what other developers are doing in your area. You may be surprised to discover which companies, big and small, have offices nearby. In my opinion, one of the best parts of a user group meeting is that the informal setting tends to make everyone more approachable and friendly. It’s not as intimidating as the crowds of several hundred to several thousand you’ll swim through at conferences.

Back to Top

Keep Yourself Motivated

Once you start down the road to success, things start to feel a bit different. People start showing you more respect. They ask for your opinions on how to best approach a problem. They listen more carefully when you have something to say. It feels great! However, that’s not reason to stop working hard to be a better developer.

If you stop working on fun side projects, learning new techniques, blogging, and participating in communities, you’re going to eventually fall behind. One day, you’ll discover that all the cool kids are “suddenly” doing things you don’t quite understand anymore. Sometimes, this is partially inevitable. Once you’ve become one of the best at what you do, you start to spend more time on very specialized projects. You end up in your own little bubble, and you can easily rationalize not staying on top of every new development. That’s not necessarily a bad thing, but there’s a line between doing this and getting too comfortable or losing focus.

Many times, feeding the desire to become a better developer offers rewards that will continue to motivate you to do more. Praise and recognition along with chances to work on more exciting and interesting projects are often enough to keep you excited. At the same time, overstimulating yourself (by overscheduling) can be a powerful demotivator. With too much “real” work, you may find yourself too tired to do the fun stuff like blog or build side projects. When that happens, you lose a powerful influence: you won’t be stimulating your mind with new ideas from outside sources. I find myself at my most creative after I’ve worked on a project in another language or if I’ve talked shop with other developers working on widely-different projects.

Every developer is different. What works to keep me motivated may not be what works for you. If you’re feeling a little burnt out, take a moment evaluate what has changed recently. Brainstorm new ideas or find inspiration elsewhere. Many developers have non-programming hobbies like playing an instrument, working on cars, or mountain climbing (among many, many others). Often, it’s something that they consider both stimulating and relaxing at the same time. Don’t let yourself get stuck in a rut too long. Be proactive and figure out what it takes to get yourself back on track.

Back to Top

Final Thoughts

Certainly, I don’t consider this list of tips an exhaustive resource. Nor would I say that doing all these things will be right for every software developer. However, I’ve described many contributing success factors in my own personal career as I see them. I would have loved to read an article like this when I was just starting out. If you’re an experienced developer, what helped you get better at your job?

Open Source Flex Component: TreeMap updated to version 2.1.0

by Josh Tynjala

It seems that I’m on a Flex component development streak lately. A couple days ago, I got some inspiration to give a little attention to my TreeMap Flex component. After initially starting on some minor performance enhancements, I kept finding more and more I could do. Several commits later, I realized I was putting together a very solid new release.

Screenshot of Introduction to TreeMap example

Most interesting of this release’s additions are the performance enhancements. I hadn’t expected to improve the performance much more than what I was able to achieve moving from the 1.x archtecture to the 2.x architecture. However, some extra time spent in the profiler, along with some inspiration from a blog post on Flash Player’s dirty rectangle by Seb Lee-Delisle (the problem he overcame wasn’t directly related to what I optimized, but it made me think about improving the way I use certain display list functions) gave me a noticeable speed increase for larger data sets over 500 items.

Another big improvement is a new implementation of the default “Squarify” layout algorithm. The original version of this algorithm, and the one that most people implement in other open source treemap projects, is recursive. As I discovered, with a large enough data provider (between 1100-1200 items), the algorithm can easily cause a stack overflow in Flash Player. I rewrote the algorithm to run in a simpler while loop, so the number of items in the TreeMap’s data provider won’t be a bottleneck anymore. This change has a positive side effect; by removing so many function calls (which have a certain performance overhead), the algorithm ends up running a bit faster.

Those are the most interesting improvements. Others include the addition of properties for separately specifying branch labels and data tips (for instance, branchLabelField takes precedence over labelField), better (and faster) skins for leaf renderers, proper non-interactive behavior when enabled is set to false (I always forget to test that when I build components), a new branchZoom event on TreeMap, more complete API documentation, and a new example named Introduction to TreeMap (pictured above) that combines, streamlines, and replaces a few of the older examples.

Like what you see? Download flextreemap from the project page. The download includes the component SWC, documentation, compiled examples, and the full source code licensed under a widely-usable MIT license. The TreeMap API documentation is also available livedocs-style online, and you can view the examples there too. and if you find any bugs in the component, the documentation, or the examples, please file a bug report. Feature requests are welcome too.

Important note: TreeMap now requires Flex 3.2.0 at the minimum. The leaf renderer is very similar to a button, and I followed some of the conventions the Flex team are using to implement the Marshall Plan as it relates to mouse events and sandboxing. Some of the APIs involved don’t appear in earlier SDKs, so you must use Flex 3.2 or higher starting with TreeMap 2.1.0.

Open Source Flex Component: PopUpThumbnail

by Josh Tynjala

While working on a new example for Wires, I built simple Flex component to display thumbnail images. When you click on the thumbnail, the full size image is displayed as a modal pop-up. The idea is similar to Lightbox, a popular JavaScript component. It’s a very simple UI control, sure, but I think it’s definitely useful in a wide range of Flex projects, so I wanted to share it. Click the image below to view a Flickr search app that demonstrates the PopUpThumbnail control:

Screenshot of the Flickr search example for PopUpThumbnail

Usage is pretty simple. It’s a subclass of the familiar mx.controls.Image, with one important change: the source property applies to the full-size pop-up content. A new property, thumbnailSource is what gets displayed in the small-size thumbnail.

<flextoolbox:PopUpThumbnail source="lolcat-big.png"
    thumbnailSource="lolcat-small.png"/>

Surprisingly, I discovered some challenges in building this component. In particular, I had one requirement that made things a little interesting. If no thumbnail is specified using the thumbnailSource property, one is automatically created by taking a bitmap snapshot of the full-size content. In this case, the full-size content must be loaded immediately. Normally, to save bandwidth, the full-size content is loaded only when it is needed (when the thumbnail is clicked). In addition to loading images from external sources, there’s also the possibility that the full-size content could be generated at runtime in Flash Player. My upcoming example for Wires manipulates BitmapData, so there’s no need to wait for a network operation. This creates a fun little maze of activity where the internal loading mechanisms in SWFLoader may or may not dispatch Event.COMPLETE to tell me that a thumbnail can be created, that I can display a progress indicator, or that the full-size content is ready to be shown and animated.

You’ll find some interesting extensibility points in this component, if you’re interested. For instance, you can customize the progressIndicator style to display something other than a ProgressBar control. A simple SWF animation might be used instead, or a custom subclass of ProgressBar with a wildly different appearance (I can’t wait until Flex 4 skinning is mainstream. That’ll make it even easier). Another thing to note is that normally, you simply have to click anywhere to hide the full-size content pop-up after it has been shown. If you want to display something more complex than an image, such as interactive content, you can change the clickToClosePopUp property to false and set up your full-size content to dispatch CloseEvent.CLOSE when it is ready to be hidden. Imagine loading a questionnaire or a wizard when some item is clicked, or even a game, and you’ll have an idea why I made that possible.

Download the component SWC and source code from my Google Code repository. API documentation for PopUpThumbnail is available as part of the common documentation with my other “Flex Toolbox” controls like ZoomFrame and CheckBoxList. As with most of my other open source code, PopUpThumbnail is available under the terms of an MIT-style license.

Pages: Prev 1 2 3 4 5 6 7 8 ...46 47 Next