SQL Tutorials/Tips

3

What are your favorite sites for SQL tutorials and tips?

Tags: asked April 8, 2010

Leave a Reply

22 Answers

8

I like our titles at the Trib because they strike a nice balance of awesomeness and professionalism and because they abbreviate well. Observe:

  • News Applications Developer (business card)
  • News Apps Dev (to staff)
  • News Hacker (to peers)
  • Hacker (to friends)

As far as a way of putting it that succinctly communicates my responsibilities to a layman--I've given up.

EDIT:

This post should include a hat-tip to the indefatigable Brian Boyer and Scott Klein (see his response), the progenitors of our awesome titles.

(Edited to include proper attribution for Scott and wiki'd because he should get the votes.)

  1. The ones we work with regularly do. The ones that don’t usually require examples of what we do anyway–making the title somewhat less important to the conversation. :-)

  2. Agreed. I think the title should be something that is easily understood both inside and outside the newsroom. This one balances those — and other facets — pretty well overall.

  3. My title is Editorial Developer, I sit just opposite someone who’s title is Development Editor (which has nothing to do with code).

    Developer is such an odd word, you’d expect it was something to do with film processing.

    Perhaps just replace the hyphen with a slash Hacker/Journalist

Leave a Reply

550
4

Found some myself for now:

http://github.com/tthibo/SQL-Tutorial#readme

http://github.com/tthibo/SQL-Tutorial/blob/master/part2.textile

http://sqlzoo.net/

Leave a Reply

385
3

A good tool for playing around is SQLite. It's easy enough to install and get running, and everything is in one file, so there's no server to set up.

It's a good way, if you're using Django or Rails, to develop a site locally, then push everything to MySQL or postgres when you go live.

Leave a Reply

785
3

I unfortunately can't make it out to Philly but here's what I would love to talk about with a KMS. I look forward to tracking the conversations on Twitter.

Cross-platform tracking of information

• Can knowledge be tracked in standard formats so that a news organization’s KMS is valuable to non-news organizations as well?

• What would it look like for various newsrooms to aggregate and integrate what is contained in their KMS? More importantly what would it look like if we had a system of standards-based KMSes from various fields that could be plugged into each other? What would the role of a news organization be here?

Role of a KMS in mobile

• How can we present all of this data in a way that not only works for the desktop environment but is also discoverable enough for mobile users?

• What forms could a KMS take that makes information even more relevant to mobile users?

Role of a KMS in ongoing coverage

• What are the ways that this structured knowledge repository can be used to analyze and make adjustments to a news organization’s coverage?

• Can tracking user interaction with the products of a KMS help us to create more (in both a quantitative and qualitative sense) journalism?

• Do the views of a news organization’s topics of importance mesh with a community’s?

For those interested in this session I would also recommend this discussion with David Siegel about the semantic web and the notion of a pull economy of information. This post from “the human network” is also worth reading as a background for the discussion.

Leave a Reply

30
3

Just a warning: it's easy to go WP plug crazy. Plugs do so much so quickly so easily. But plugs can cause WP woes, when multi-plugs don't play well together, or not upgraded, or not rewrit for the latest WP vers.

Often w/ a sprinkling of php savvy, you can often accomplish a plugs job w/ far less code, and far less chance of future headaches. An example: the popular AddThis social/share widget is a 172K d/l. But all it really does is add this bit of code to the loop:

<!-- AddThis Button BEGIN -->
<a class="addthis_button" href="http://www.addthis.com/bookmark.php?v=250&amp;username=XXXXX"><img src="http://s7.addthis.com/static/btn/sm-share-en.gif" width="83" height="16" alt="Bookmark and Share" style="border:0"/></a><script type="text/javascript" src="http://s7.addthis.com/js/250/addthis_widget.js#username=XXXXX"></script>
<!-- AddThis Button END -->

If you insert that yourself, you and your users save code-load overhead; you get far more control of where/how it displays. Same idea w/ Google Analytics for WordPress. One quick way to get a plug's code is to install & activate the plug, then look at a post's HTML and grab whatever the plug inserts.

You decrease your chances of problem plugs by doing some due diligence:

  • Avoid plugs not yet in the WordPress: Plugins Directory.
  • Go to the directory and search for the plug. Look at is stats for Downloads, Rating, and Updated. Should be lotsa d/ls and 3.5+ stars. Also best last update wasn't years ago.
  • Get plug and look at its code; should be clean and well-commented.
  • Check how large (filesize) is it; and how much of that your must users download.
  • Test plug on a dev site before letting it loose live.

Remember: multiple plugs can hook and filter on the same functions, making problem-tracking more difficult. Also, each plug can add its own CSS and JavaCcript files: less efficient then having all (or most) js/css in your single site-wide main css and js files. Also a plug's css declarations might interfere with or override yours.

Thanks for this question, tho, cuz it's inspiring me to finally write my long-procrastinated WP Unplugged manifesto for: PubMedia.us Code.

In short, I favor admin-side plugs far more than those that affect users. On user-side, however, 'course Akismet rules, and the Audio Player rox (tho I HTML5 kludge it). If you'll be posting code: SyntaxHighlighter Evolved. Oh, and WP-reCAPTCHA, which I should replace w/ just the code but haven't got 'round to it.

Recommended admin-side plugs is a longer list; I can post if anyone cares to see 'em.

  1. Great answer. And the advice applies equally to other CMS systems … I’ve gone way too plugin happy with Drupal way too many times, only to regret it the next upgrade cycle!

Leave a Reply

63
3

Despite the rise in popularity of "external" commenting systems like Disqus and IntenseDebate, I'm still a firm believer that it's best to use the commenting system built into your CMS or framework (or use an external module built for your platform). There are huge advantages to having registered users be in your own database, having comments in your own system so they can become part of your search results, or so you can show which stories are getting the most comments, etc.

  1. Saheli – I’m most familiar with the commenting systems in WordPress and Django. They’re very different from one another. WordPress’ is more refined, and there are tons of anti-spam options for it, but it’s limited in the same ways WordPress is limited (very tightly defined content constructs). Django’s is way more flexible (you can attach comments to any data model on the same site) but you do have to do a bit more work to get the anti-spam tools working with it. I’ve had great success with both!

  2. which CMS’s do you think provide the best set of tools for handling comments, or the best API for writing more?

Leave a Reply

90
2

I always reference W3Schools when recommending materials for newcomers to webby subjects. Their SQL tutorial isn't the best on the site, but its still quite good.

Leave a Reply

550
1

Here is a pretty decent tutorial on how to create topics pages in Wordpress from the knight digital media center.

A news site often publishes many related articles on the same topic, such as "Healthcare Reform." While these disparate articles may be linked to one another through a tagging or category interface, it's ideal if a site can maintain a stable, easy-to-remember URL that gathers related content under a single umbrella. Having a "topic page" like this helps readers, who now have a single definitive source to bookmark for a given topic, helps with search engine optimization, and helps the publication generate traction on particular areas of coverage.

http://multimedia.journalism.berkeley.edu/tutorials/wp-topics/

Leave a Reply

20
1

And here's a piece about a plugin for managing the permissions and roles of multiple people. It's helpful for distinguishing between authors and editors, and what people in each role can/can't manage on the site.

http://wphacks.com/managing-your-author-roles-with-a-wordpress-plugins/

Leave a Reply

120
1

If you use a framework like Django, you'll be using an ORM or Object Relational Manager rather than writing SQL. I'm not saying you don't need to learn SQL, but ORM syntaxes are definitely picking up steam, and make it easier to write complex queries. I'm glad I have a SQL background, but haven't written a line of raw SQL for a couple of years now.

Leave a Reply

90
1

Once you have the basics down, a couple of the major open-source database engines provide fantastic documentation, which can tell you almost all you'll ever need to know about SQL, if you're willing to look through them enough. Some of it is engine-specific, but a lot of it is not. You can learn a lot by just browsing through them and looking at the examples. The PostgreSQL docs are awesome, and the MySQL docs are not too shabby, either.

Use the PostgreSQL docs search engine liberally and often.

The most important thing when reading the documentation is to understand the syntax of how they lay out all the command options.

[ stuff in sqaure brackets ] => optional 
this | that => "or"
{ option_a | option_b | option_3 } => pick one

Leave a Reply

10
1

I have been playing a bit with Disqus lately. Thinking about replacing the stock commenting on Drupal with it. It's an out of the box system, but I haven't ran into any bugs with it yet.

  1. We’re playing around with Disqus as well. Staff have been really responsive, API seems generally good, etc. Solves a key problem for us — we need comments with a consistent sign-on and user experience between our CMS and our Rails apps.

    I’m a bit unnerved by the third-party cookie error you get in some browsers. Dunno if anybody has seen problems with that. Might promote that thought to a full Question, actually.

  2. Ah. I haven’t even tried pingbacks yet. That’s an interesting problem though.

  3. I also have been trying Disqus, but have had some bugs with it properly catching “reactions” — other social media mentions of a blog post. They have a “help” button that you click as a moderator to ask them to recover missed reactions, so seems it must be a common problem.

Leave a Reply

94
0

I agree it should be for journalists, but also appeal to the hackers as well. We should find something in the middle, perhaps not too journalism focused that might not be clear to the hackers (who I often have to educate about the journalism meaning of "hack").

Or it can simply be basic words like community, answers, interchange, exchange, dialogue?

Leave a Reply

385
0

I have to admit, I like "Hack Overflow" better than any other suggestions so far, and I think that in the context of a "hackshackers.com" domain name, there's considerably less risk of confusion. I was thinking of "hackoverflow.com" when I raised the original concern.

I don't quite love "help.hackshackers.com" just because I feel like there's more than that going on. But I could live with it.

In short, I think that the domain name we have right now is pretty cool.

Leave a Reply

351
0

I agree it should be something simple and understandable. HH Help, HH Exchange, HH Resource, HH Tech Center, Tech exchange, Idea exchange, tech desk, hack desk, hack support... How about 'haxchange'?

Leave a Reply

20
0

How about QandA.hackshackers.com?

Leave a Reply

385
0

I second W3Schools and SQL Zoo. Also, once you've gotten a grasp of how it works, I think the below cheat sheet is pretty helpful. It reminds you of the necessary syntax before it gets ingrained to your head, and my bookmarked copy is a pretty well-worn link. There's nothing like a quick tip on deadline!

http://www.sqltutorial.org/sql-cheat-sheet.aspx

Leave a Reply

120
0

Not a site, but SitePoint has:

Simply SQL

I haven't read it yet, but I've enjoyed some of their other books. I got the PDF version as part of a deal and they currently have another good sale.

Leave a Reply

554
0

Joe Celko's books are dated and a bit pedantic, but helped me learn a lot about thinking in SQL.

Leave a Reply

50
0

I haven't used it as a developer, but as a user I was reasonably impressed with IntenseDebate.

EDIT:

You also asked "why." I don't have too many specific things to cheer about, but it supports a wide-variety of credentials while still providing a consistent user experience. Its got nice threaded comments, gravatars, HTML, etc. And it looks great on the page. Its more or less the comment system I can imagine myself building if I really wanted to invest a lot of time in it.

Leave a Reply

550
0

I don't know what types of data news orgs are positioned to produce, because It is unclear to me exactly what we already have.

How about brainstorming data types that news orgs produce already? We can test the resulting ideas on the vast amounts of data already on the web.

An obvious example is GEO data, the everyblock source code includes a clever set of Regular Expressions used to infer (NLM) GEO data from simple text files.

View the source here: http://github.com/jboydston/OpenBlocks/blob/master/addresses.py

What type of language is consistent in news copy, from which we can infer this type of data? Simple experiments of this type could give us valuable insight into the potential for tomorrow's KMS.

A tool worth exploring: addressextract - by Matt Croydon::Postneo

http://addressextract.appspot.com/

Leave a Reply

20
0

I attempted to coin 'CoJo' - Coder Journalist - but maybe it's a little bit too much Stephen King.

Leave a Reply

94

Your Answer

Please login to post questions.