Paul´s Blog

Informações Inúteis do dia-a-dia

Programmer 101: Teach Yourself How to Code

fonte: Lifehacker

You’ve always wanted to learn how to build software yourself—or just whip up an occasional script—but never knew where to start. Luckily, the web is full of free resources that can turn you into a programmer in no time.

Since the invention of the internet, programmers have been using it to discuss software development techniques, publish tutorials, and share code samples for others to learn from and use online. If you’re curious about how to become a programmer, you can get off to a running start using tons of great free web-based tutorials and resources.

First Things First: Don’t Get Hung Up on Choosing a Language

A common pitfall for beginners is getting stuck figuring out which programming language is best to learn first. There are a lot of opinions out there, but there’s no one “best” language. Here’s the thing: In the end, language doesn’t matter THAT much. Understanding data and control structures and design patterns does matter very much. Every language—even a simple scripting language—will have elements that you’ll use in other languages as well and will help you learn. In classes I took to get my degree in Computer Science, I programmed in Pascal, Assembly, and C—languages I never actually got paid to program in professionally. I taught myself every language I’ve used in my career, reusing concepts I already knew, and referring to documentation and books to learn its syntax. So, don’t get hung up on what language to learn first. Pick the kind of development you want to do, and just get started using one that works.

There are several different kinds of software development you can do for various platforms, from the web to your desktop to your smartphone to a command line. In this article, we’ll outline some of our favorite starter tutorials and resources for teaching yourself how to program for each major platform. We’re going to assume you’re a savvy user, but a newb when it comes to wrangling code snippets, so we’ll keep things at the beginner level. Even just following through a beginner programming tutorial, you’ll be happy to see how far you can get.

Desktop Scripting

The easiest way to try your hand at programming for your Windows or Mac desktop is to start with a scripting or macro program like AutoHotkey (for Windows) or Automator (for Mac). Right now hardcore coders throughout the Lifehacker readership are yelling at their monitors, saying that AHK or AppleScript are not “real” programming. That may be true—technically these types of tools just do high-level scripting. But for those new to programming who just want to get their feet wet, automating actions on their desktop, these free tools are a fantastic way to start—and you’d be surprised at how much you can do with them.

For example, Adam developed the standalone Windows application we all know and love, Texter, using AutoHotkey, so this scripting language is capable of far more than just small-scale automation projects. To get started with AutoHotkey, check out Adam’s tutorial on how to turn any action into a keyboard shortcut using AutoHotkey. (Then, check out the source code for Texter to see the innards of a full-fledged AHK-based Windows application.)

Web Development

Instead of being bound to specific programming languages and the look and feel of a particular operating system, you can put your killer application in the browser and run it in the cloud, as a webapp. Welcome to the wonderful world of web development.

HTML and CSS: The first thing you need to know to build any web site is HTML (the page markup that makes up web pages) and CSS (the style information that makes that markup look pretty). HTML and CSS are not true programming languages—they’re just page structure and style information. However, you should be able to author simple HTML and CSS by hand before you begin building web applications, because a web page is the frontend to every webapp. This HTML tutorial is a good place to start.

JavaScript: Now that you can lay out a static web page with HTML and CSS, things get fun—because it’s time to learn JavaScript. JavaScript is the programming language of the web browser, the magic that makes dynamic in-page effects go. JavaScript is also the stuff of bookmarklets, Greasemonkey user scripts, and Ajax, so it’s the key to making all sorts of web goodies. Start learning JavaScript here.

Server-side scripting: Once you’re good at making things happen inside a web page, you’re going to need to put some dynamic server action behind it—and for that, you’ll need to move into a server-side scripting language, like PHP, Python, Perl, or Ruby. For example, to make a web-based contact form that sends an email somewhere based on what a user entered, a server-side script is required. Scripting languages like PHP can talk to a database on your web server as well, so if you want to make a site where users can log in and store information, that’s the way to go. Excellent web development site Webmonkey is full of tutorials for various web programming languages. See their PHP Tutorial for Beginners. When you’re ready, check out how to use PHP to talk to a database inWebMonkey’s PHP and MySQL tutorial. PHP’s online documentation and function reference is the best on the web. Each entry (like this one on the strlen function) includes user comments at the bottom which are often as helpful as the documentation itself. (I happen to be partial to PHP, but there are plenty of other server-side scripting languages you might decide to go with instead.)

Web frameworks: Over the years, web developers have had to solve and resolve the same problems and rewrite similar code to build dynamic web sites. To avoid making everyone reinvent the wheel for every new web development project, some programmers have come up with development frameworks that do some repetitive work for you. The popular Ruby on Rails framework, for example, takes the Ruby programming language and offers a web-specific structure for getting common web application tasks done. In fact, Adam used Rails to build his first serious (and impressive!) web application, MixTape.me. Here’s his take on how to build a web site from scratch with no experience. Other popular web development frameworks include CakePHP (for PHP programmers), Django (for Python programmers), and jQuery(for JavaScript).

Web APIs: An API (Application programming interface) is a programmatic way for different pieces of software to talk to one another. For example, if you want to put a dynamic map on your web site, you want to use a Google Map instead of building your own custom map. The Google Maps API makes it easy to programmatically include a map in a page with JavaScript. Almost every modern web service you know and love has an API that lets you include data and widgets from it in your application, like Twitter, Facebook, Google Docs, Google Maps, and the list goes on. Integrating other webapps into your web application via API’s is the final frontier of rich web development. Every good, major web service API offers thorough documentation and some sort of quick start guide to try it out (here’s Twitter’s, for example). Go crazy.

Command Line Scripting

If you want to write a program that takes textual or file input and outputs something useful, the command line is the right place to do it. While the command line isn’t as sexy or good-looking as a webapp or desktop app, for rapid development of quick scripts that automate processes, you can’t beat it.

Several scripting languages that work on a Linux-based web server also work at the command line, like Perl, Python, and PHP—so learning one of those baddies makes you conversant in two contexts. My path never took me too far down the Perl road, but I taught myself Python using the excellent and free online book, Dive into Python.

If becoming a Unix ninja is one of your programmer goals, you absolutely must get good at shell scripting with bash. Bash is the command line scripting language of a *nix environment, and it can do everything from help you set up automated backups of your database and files to building out a full-fledged application with user interaction. Without any experience writing bash scripts beyond a dozen lines, I wound up developing a full-on personal to-do list manager in bash, Todo.txt CLI.

Add-ons

Nowadays, modern webapps and browsers are extensible with with bits of software that bolt onto them and add features. Add-on development is gaining in popularity as more developers look at existing software, like Firefox or WordPress, and think “But if only it could do THIS…”

You can do a whole lot in any web browser with just a mastery of HTML, JavaScript, and CSS. Bookmarklets, Greasemonkey user scripts, and Stylish user styles are created with the same bits of code that make regular web pages, so they’re worth learning even if you just want to tweak an existing site with a small snippet of code.

More advanced browser add-ons, like Firefox extensions, let you do more. Developing Firefox extensions, for example, requires that you’re conversant in JavaScript and XML (markup that’s similar to HTML, but way more strict in format). Back in 2007 I ran down how to build a Firefox extension, a skill I picked up after I stumbled upon a free tutorial.

Many free and well-loved web applications offer an extension framework as well, like WordPress and MediaWiki. Both of those apps are written in PHP, so comfort with PHP is a prerequisite for getting started. Here’s how to write a plug-in for WordPress. Developers who want to ride the cutting edge of Google Wave can get started writing gadgets and bots in HTML, JavaScript, Java, and Python. I wrote my first Wave bot following this quick start tutorial in one afternoon.

Web Development for the Desktop

The best part about getting started programming in one context is when you can take those skills and apply them elsewhere. Learning web development first is a great way to start because now there are ways to put those skills to work on desktop applications, too. For example, Adobe AIR is a cross-platform run-time environment that lets you build your app once and release it to run on the desktop for every operating system AIR runs on. AIR apps are written in HTML, Flash, or Flex, so it lets you apply your web development skills in a desktop context. AIR is a great option for deploying desktop apps like one of our top 10 apps worth installing Adobe AIR for.

Mobile App Development

Mobile applications like the ones you run on your iPhone or Android smartphone are all the rage right now, so you may have dreams of striking it rich in the iTunes App Store with the next killer app. However, for the new coder, diving headfirst into mobile development can be a rough learning curve, since it requires comfort with advanced programming languages like Java and Objective C. However, it’s worth checking out what iPhone and Android development looks like. Check out this simple iPhone application development example to get a taste of what iPhone developers do. Android apps are written in Java, and here’s afriendly video tutorial of what building a “Hello Android” application workflow looks like.

Patience, Elbow Grease, Trial and Error

Good coders are a special breed of persistent problem-solvers who are addicted to the small victories that come along a long path of trial and error. Learning how to program is very rewarding, but it can also be a frustrating and solitary experience. If you can, get a buddy to work with you along the way. Getting really good at programming, like anything else, is a matter of sticking with it, trying things out, and getting experience as you go.

This article is just one self-taught programmer’s top-of-mind recommendations for beginners. Experienced programmers: What did I miss? No matter your skill level, add your thoughts and recommendations for beginners to the comments.

Gina Trapani, Lifehacker’s founding editor, thinks the best programmers are self-taught. Her weekly feature, Smarterware, appears every Wednesday on Lifehacker. Subscribe to theSmarterware tag feed to get new installments in your newsreader.

Send an email to Gina Trapani, the author of this post, at gina@lifehacker.com.

Anúncios

novembro 14, 2009 Posted by | Dicas, Ferramentas, Programação, Tecnologia, Tips | Deixe um comentário

Crie um um pendrive usb iniciável com o Windows XP

http://blogs.techrepublic.com.com/itdojo/?p=108?tag=nl.e099.dl043008&tag=nl.e099

abril 30, 2008 Posted by | Dicas, Ferramentas, Tecnologia, Tips | Deixe um comentário

Microsoft lança Silverlight para competir com o Flash da Adobe


Microsoft Silverlight é a mais nova tecnologia para navegadores e plugins da nova geração. Desenvolvido para competir com o todo-poderoso Flash, da Adobe, Silverlight oferece uma nova experiência para aplicativos ricos e interativos na internet.

Através
deste plugin é possível visualizar animações, vídeos e aplicativos
produzidos nesta plataforma, a qual tem como proposta arrebatar grande
percentual de usuários da internet, tornando-se indispensável para
visualização de vídeos e websites, assim como é o Flash atualmente.

Esteja preparado para o futuro

As
notícias também são boas para os desenvolvedores, visto que a inovação
suporta diversas linguagens de programação, incluindo AJAX, C#, Python,
Ruby e Visual Basic. Além disso, o Silverlight se integra a outras
aplicações web. Portanto, é de se esperar que existam utilidades
interessantes no futuro.

Se você ainda não acessou nenhum site
que exija tal tecnologia, não se surpreenda, pois Silverlight é novo e
ainda está em fase de testes. Porém, gigantes do entretenimento como a
Twentieth Century Fox já estão testando trailers de filmes nesta
tecnologia.

O maior destaque fica por conta da transmissão de
vídeos, que utiliza o codec VC-1 para fornecer uma transferência de
dados com maior qualidade e ainda a possibilidade de trabalhar com
resoluções em Full HD (1080p). Vale ressaltar o uso da aceleração de
hardware 3D, também presente para acirrar a corrida pela tecnologia que
dominará o mercado.

Veja agora algumas das características de Silverlight:

  • Oferece uma experiência ampla na incorporação de vídeos, animações e interfaces interativas.
  • É pequeno e de fácil instalação, possuindo menos de 2 MegaBytes.
  • Pode
    criar e trabalhar com gráficos vetorizados, assim como textos,
    animações e sobreposições que interagem com gráficos e efeitos de alta
    qualidade.
  • Os desenvolvedores podem criar aplicativos
    programando em diversas linguagens, dentre elas: AJAX, C#, Python, Ruby
    e Visual Basic.
  • Foi produzido para funcionar em
    plataforma-cruzada. Em outras palavras, foi projetado para trabalhar em
    diversas arquiteturas e sistemas operacionais.
  • Transmissão de áudio e vídeo

    A
    tecnologia Silverlight foi empregada para gerar novas soluções de
    transmissão com alta qualidade, possibilitando alcançar patamares nunca
    conquistados. Para isso, é possível usar o Microsoft Expression Media
    Encoder e outros ambientes de edição. Ótimo para que webdesigners
    possam ter controle completo sobre suas aplicações.

    Entre as
    principais características de transmissão estão: suporte a biblioteca
    API, possibilidade de usar ferramentas da Microsoft ou de terceiros,
    trabalhar com qualidade de streaming maior que a de DVDs e também permissão para hospedar arquivos de vídeo/áudio maiores que 4 GigaBytes.

    Conhecendo a tecnologia:

    Após baixar o plugin, acesse o seguinte site: Clique Aqui
    e veja os trailers de filmes através da tecnologia Silverlight — são ao
    todo 4 filmes que estão para serem lançados no cinema pela Fox. Também
    é possível brincar com alguns aplicativos, tocando piano, tatuando
    braços e muito mais. Basta acessar o site de demonstrações de ferramentas e aplicações.

    Nossa Opinião

    A
    guerra começou! Após anos de hegemonia, a tecnologia Flash da Adobe —
    presente em 98% dos computadores que acessam a internet — pela primeira
    vez encontrou um concorrente de peso: o Silverlight da Microsoft. Para
    retrucar, a Adobe planeja lançar o Adobe Media Player e o Adobe Apollo,
    contudo a MS saiu na frente ao liberar a versão de testes do seu
    produto.

    Ao assistir aos trailers disponibilizados pela Fox, são
    notáveis o bom desempenho e qualidade de transmissão de vídeo do
    Silverlight, com uma resolução de imagem que deixa qualquer um de
    queixo caído. O melhor de tudo é que o carregamento é muito rápido, com
    pouco buffer. Os aplicativos também são interessantes e
    prometem fazer sucesso. Brincando com alguns deles é possível concluir
    que Silverlight veio para brigar de frente com o Flash. Não é para
    menos, uma vez que a Microsoft gastou praticamente 100 milhões de
    dólares para desenvolver a nova tecnologia.

    No entanto, a Adobe
    não vai deixar barato e em breve deve mostrar as cartas na manga ao
    público. Enfim, apesar da batalha estar decretada, conhecer e explorar
    uma nova tecnologia é ótimo para o usuário, pois o combate entre as
    duas gigantes deve acelerar o desenvolvimento de revoluções no mundo
    multimídia da internet.

    Baixe o Software aqui

    fonte: IG Downloads

    abril 23, 2008 Posted by | Dicas, Ferramentas, Java, Programação, Tecnologia, Tips | Deixe um comentário

    Understand how to truly customize the Outlook Today page

    http://tinyurl.com/4hmmgf

    abril 15, 2008 Posted by | Dicas, Ferramentas, Tecnologia, Tips | Deixe um comentário

    Featured Freeware: Auslogics Disk Defrag

    fonte: download.com

    Hopefully, there aren’t too many Windows users left who don’t have
    Auslogics Disk Defrag. In case you don’t, though, this is an excellent
    time to stop using the slow, native Microsoft defragger and
    upgrade–for free!–to an app that works better and faster: Auslogics Disk Defrag.

    Even on older Windows XP systems, the program runs reasonably fast.
    Chose a hard drive from the drop-down menu to get a read on its stats
    such as free and used space and get a visual comparison in a pie chart.
    One click starts the defragging, and along with a visual table
    representing the various bits and bytes that are being shunted around,
    you also get a running ticker of the file currently being defragged.
    Disk Defragger spits out a bar graph and an HTML report at the end,
    lacking only a final sector map.

    abril 9, 2008 Posted by | Dicas, Ferramentas, Tecnologia, Tips | | Deixe um comentário

    Geek to Live: Essential email filters

    fonte: Lifehacker

    by Gina Trapani

    I receive hundreds of email messages a day, but only a couple dozen actually make it into my inbox. Thanks to the automated power of full-strength email filters, just the messages that are important enough to deal with catch my attention when I’m busy.

    It’s not that I don’t read every message I receive eventually, it’s that I want to do it on my own terms and in my own time. Low-priority, unsolicited email shouldn’t suck up brain cycles when I’m under deadline. Only the “important” messages should be let through the gate. Here’s where email filters save the day.

    It’s taken me years to polish and perfect this set of tried and true armed guards who protect my inbox from undesirables. Today I’ll share some of my favorites – and then I want to hear about yours.

    The examples here use Gmail’s format because of its superior searching capabilities that allow for complex, specific filters. Many can be applied to most modern email clients.

    NOW messages

    Receive these right away.

    LATER messages

    Let these gather quietly out of sight till you’re ready to deal.

    NEVER messages

    Messages you don’t ever want to see. (MWAHAHAHA!)


    Notify

    For: Anyone with a spouse, boss, co-worker or receiving messages about an urgent issue.

    How it works: Set any message from a set of Very Important People or containing keywords to forward to your phone or pager.

    Example: Forward messages from your boss or your wife or with the words “Your check” to your phone.

    Matches: from:(boss@1ifehacker.com OR wife@home.com) OR subject:”Your check”
    Do this: Forward to 7185551212@teleflip.com

    [back to top]


    Cold Callers

    For: Anyone with a published email address (like on a web site) that anyone in the whole world might Google up and use to contact you.

    How it works: Send any email to your “public-facing” email address into a “cold callers” folder or label.

    Example: Any email that comes to the tips at lifehacker.com address go into the “tips” label (or folder.)

    Matches: to:(tips@lifehacker.com)
    Do this: Skip Inbox, Apply label “tips”

    Exclude VIP’s from this filter like this:

    Matches: to:(tips@lifehacker.com) from:(-wendy@lifehacker.com AND -adam@lifehacker.com)
    Do this: Skip Inbox, Apply label “tips”

    [back to top]


    Mailing Lists

    For: Anyone subscribed to mailing list(s).

    How it works: Set any messages to the mailing list addresses to skip the Inbox. (Note: The “Not to Me” filter below works for mailing lists as well.)

    Example: Send messages to (not from!) list1@example.com or list2@example.com to “mailing list” folder/label.

    Matches: to:(list1@example.com OR list2@example.com)
    Do this: Skip Inbox, Apply label “mailing list”

    [back to top]


    Not to Me

    For: Anyone with CC-happy co-workers, or correspondents who like to send out mass BCC’ed email messages to a group of people.

    How it works: If none of your legitimate email addresses are in the To: field, file away in “Not to me” folder/label. See also how to color-code messages only to you.

    Example: If none of my email addresses are in the To: line, it skips the Inbox.

    Matches: to:(-(ginatrapani@myfirstaddress.com OR gina@mysecondaddress.com OR gtrapani@mythirdaddress.com))
    Do this: Skip Inbox, Apply label “not to me”

    [back to top]


    Fwd’s

    For: Anyone whose Aunt Bertha insists on forwarding poems and kitten pictures.

    How it works: Send any message with “Fwd” in the subject line to a “later” folder/label.

    Example: Shuttle messages from Aunt Bertha and Uncle Hal with “fwd” in the subject line to a “later” folder/label.

    Matches: from:(auntbertha@aol.com OR unclehal@aol.com) subject:Fwd
    Do this: Apply label “later”

    [back to top]


    Automated

    For: Anyone who automates (crons) jobs that email them every night with the results.

    How it works: Send any automated messages to the “Automated” folder.

    Example: If the from field contains “Cron Daemon,” move it to Automated.

    Matches: from:(“Cron Daemon”)
    Do this: Skip Inbox, Apply label “automated”

    Note: You can filter out the messages that indicate a problem. For example, if my nightly backup fails, I want to know about that. So you can add exceptions to the filter, like this:

    Matches: from:(“Cron Daemon”) AND -subject:”SyncBack Status – PROBLEM”
    Do this: Skip Inbox, Apply label “automated”

    [back to top]


    File storage

    For: Anyone who uses their email as a backup solution, like GSpace or Gmail Drive users.

    How it works: Shuttle any messages with the file storage subject line into a “backup” folder.

    Example: Send messages with “GSPACE” in the subject line to backup folder.

    Matches: subject:(“GSPACE” OR “EMAILBACKUP”)
    Do this: Skip Inbox, Apply label “backup”

    [back to top]


    Bozo Filter

    For: Anyone who’s had the misfortune of being added to an email list from which they can’t seem to unsubscribe, or who get badgered by *cough* PUBLIC RELATIONS BULLDOGS *cough* who spam you with messages every day.

    How it works: Messages from anyone who you never want to hear from again under any circumstances get deleted.

    Example: Messages from folks on my blacklist get automatically deleted.

    Matches: from:(annoyingperson1@example.com OR annoyingperson2@example.com) Do this: Skip Inbox, Delete it

    [back to top]


    What are your most effective email filters? Tell us all about ‘em in the comments or to tips at lifehacker.com.

    Gina Trapani, the editor of Lifehacker, loves a good strong filter. Her semi-weekly feature, Geek to Live, appears every Wednesday and Friday on Lifehacker. Subscribe to the Geek to Live feed to get new installments in your newsreader.

    março 13, 2008 Posted by | Dicas, Ferramentas, Tips | Deixe um comentário

    Collaborate on a Whiteboard or any Web Page with Twiddla

    from Lifehacker

    twiddla_cropped.jpgTwiddla, a free whiteboarding service that doesn’t require sign-ups to start using, turns any web site, photo or graphic file into a canvas for marking and discussion. Winner of this year’s Technical Achievement award at the SXSW festival, Twiddla isn’t the only whiteboard service, for sure, but its ease of use and quick setup and extra features—including live conference-call-style audio chat—make it a stand-out. You can check out Twiddla’s features without even launching a “guest” account by trying out its live “sandbox” mode. For web workers, design types, and anyone needing to draw out or discuss an idea, it’s a worthy tool to keep bookmarked.

    março 12, 2008 Posted by | Dicas, Ferramentas, Tips | Deixe um comentário

    How Do You Reclaim Your Time and Attention? [Ask The Readers]

    clock.jpgIf your everyday activities are not providing you with any value, skip them, says 43Folders blogger Merlin Mann. How do you determine what time is wasted and what time is valuable? Use tricks (life hacks) to take shortcuts through time consuming processes. When it comes to your online communications, disable email so that you can stay focused on the tasks at hand. Use email filters that enable you to promote only the most important messages to the top of your Inbox. Don’t let people boss you around. What tips have you integrated into your routine to take back that precious time? Share your secrets in the comments.

    How to Take Back Your Time and Attention [InformationWeek]

    março 10, 2008 Posted by | Dicas, Ferramentas, Tips | Deixe um comentário

    Learn How to Build a Pipe in Just a Few Minutes

      Pipes only sounds hard. Watch our intro and see how you can quickly turn your idea into a usable, working feed.

    março 6, 2008 Posted by | Dicas, Ferramentas, Programação, Tecnologia, Tips, Vídeos | Deixe um comentário

    Avoid Keyloggers with Neo’s SafeKeys

    fonte: Lifehacker

    neossafkey.png
    Windows only: When you’re in a shady internet cafe in Bangkok and you’re worried about rogue software logging your passwords as you type them, you need a USB drive with Neo’s SafeKeys on it. Neo’s SafeKeys is a small, mouse-based keyboard that shows up on your screen in different places each time you run it from your drive. You click the SafeKeys keyboard to enter your password, then select it and drag and drop it to the password field to bypass keylogging AND clipboard logging software. A great addition to your portable apps collection, Neo’s SafeKeys is a free download for Windows only.

    março 6, 2008 Posted by | Dicas, Ferramentas, Tecnologia, Tips | Deixe um comentário