Linux Blog

Mashups: Strategies for the Modern Enterprise Review

Filed under: General Linux — TheLinuxBlog.com at 6:30 am on Wednesday, October 27, 2010

Mashups Strategies for the Modern Enterprise Review

I went to the local library to pick up some books, this time I actually browsed the IT section. To my surprise I found some relatively (in library sense) new books, one of which was “Mashups: Strategies for the Modern Enterprise.” I wasn’t going to pick it up, but I saw it was from Addison-Wesley. Not only my favorite publisher because they publish decent books, but they also have a great logo (triforce anyone?) If that wasn’t enough to convince me, the cover certainly was. I mean come on its a pear-orange-lemon-plum-lime-apple I’d like to see what one of those tastes like. Essentially this is what this book is about; Mashups. Taking things that don’t necessarily belong together and bringing (mashing) them together to make something new and interesting.

I thought I knew a bit about mashups, which is why I was hesitant to pick it up. After taking it home I found it to be way more in depth than I first imagined. Explaining different models in depth really makes one think about the larger pictures. There is a whole chapter dedicated on how to create a sample mashup. It gives the principles and leaves the reader (in this sense me) with a better understanding of the inner workings of mashups. It even includes a portion on security that doesn’t just seem like it was added in as an after thought.

I may just have to pick up my own copy of this book because I feel bad that I’ve renewed it once already. I think other people could benefit from reading it. Who knows maybe they’ll read this review and use the recall function, its definitely worth the time and money.

Ubuntu Unleashed 2010 Edition Review

Filed under: General Linux — TheLinuxBlog.com at 11:36 am on Monday, January 25, 2010

Irritated with my Desktop after an upgrade gone bad and an incident with the nvidia noveau driver that left me x less, I decided it was time to re-install. I turned to my bookshelf to find Ubuntu Unleashed 2010 Edition. Normally by the time a book hits my shelf the material is outdated, not necessarily useless, just not the most up to date. This is an exception. The Ubuntu Unleashed 2010 Edition was updated with an Ubuntu 9.10 DVD and a “Free Upgrade to Ubuntu 10.04″ which I found out that if you buy the book before the end of 2010 you can get an upgrade kit in the mail.

So, I pop the DVD in the drive and start the installation. Nothing new here for anyone that has installed Linux or Ubuntu recently; for those that haven’t, it was a pleasant surprise to see that it actually detected my high resolution monitor and used it to its advantage. It really is strange to not have to squint at an installer. The first chapter covers the step by step installation in more detail which is relatively short and easy to follow. Most people should not need to read this if they are familiar with installing an operating system but it I think it is good to have it there. Just don’t let this first chapter prevent you from looking further into this book. After putting the DVD in and getting it started, I found myself reading the book through the entire installation; which for some reason got from 0-90% quickly, then took the majority of the time in the 90% range, but I’m not complaining.

The Authors really did a good job of writing in an understandable language and organizing the book in a logical format. I’ve found myself flipping through and finding many golden nuggets of information. I personally would not have picked this book up because of the title, since I’m not a big Ubuntu user. But Ubuntu Unleashed 2010 edition is packed full of information, 32 chapters and a hefty appendix to be exact. It is not all Ubuntu – specific either, meaning most of the content should work on just about distribution. This book would not be rendered useless if you don’t decide to go the Ubuntu route. I recommend taking a look at the contents and buying this book, as I’m sure you’ll be pleasantly surprised at the topics it covers. I think it would be a great book for someone that is interested in Linux in general, it reads well but can also be used as a quick reference. I wish I had a book like this when I was getting started, it would have saved me a whole lot of time and effort. I have set aside some of the more advanced chapters and made a note to read later.

Other reviews I’ve read have said that it has too much terminal use in it, which is something Ubuntu is trying to eliminate. While this may be true, if you want the most out of your Linux distribution, the fact is you will at some point use a terminal. Commands are less likely to change as much as graphical interfaces. Although some things may be slightly outdated I don’t think that this book should be re-written, as it is in the nature of open source and technology to change. If you keep this in mind I don’t think you’ll be disappointed with it.



Lite Reading : a Review of SQLite by Chris Newman

Filed under: General Linux — TheLinuxBlog.com at 4:45 pm on Monday, June 15, 2009

SQLite This review is sort of a long time coming. The book is simply called SQLite. SQLite (the book) was written by Chris Newman (0-672-32685-X) and is one of the books in the Developer’s Library from InformIT. Books in the Developer’s Library are designed for programmers as high quality references and tutorials on technical subjects. I believe that this is the first book that I have read and personally owned in the series. The book’s “tag-line” so to speak is:
A practical guide to using, administering, and programming the database bundled with PHP 5
and hits it right on the mark. While the book is small it packs a punch. Chris Newman makes it a point to go into detail where needed and skip the parts that are not necessary. One one of my gripes about programming books is that they contain too much programming and logic basics.

The book is split up into three logical parts, Part I consisting of General SQLite Usage, Part II Using SQLite Programming Interfaces and Part III SQLite Administration.

Part I has four chapters the first not being entirely necessary for the SQL guru, but I learned a few things that I would not have known otherwise, and it was a quick read if you skip the basic SQL stuff. The second through forth chapters are on actually working with SQLite such as the structures, syntax / usage and query optimization.

Part II is a chapter for each interface (PHP, C/C++, Perl, Tcl and Python.) Whether you use each of these technologies or not is irrelevant since it is invaluable as a reference if you wished to use your existing databases with these languages. Reading all of these chapters are not needed if you have no intention of using the language right away.

Part III discusses administration and the SQLite Virtual Database Engine. For me just wanting to learn SQLite the section on the VDBE was a little overkill, but interesting none the less. I like that it was included and think it will be useful in the future.

Overall I think SQLite has a good balance for SQL newbies and seasoned gurus just wanting to quickly get up to speed and implement SQLite. It has everything I’ve needed and then some for my tinkering with SQLite.

Securing PHP Web Applications Review

Filed under: General Linux — TheLinuxBlog.com at 11:43 am on Friday, February 27, 2009

Securing PHP Web Applications

As a somewhat seasoned PHP developer, I’m always looking for ways to improve code and keep up with the latest happenings. When I saw the book, “Securing PHP Web Applications” by Addison-Wesley, I thought I’d give it a look. PHP is known for its wide deployment and rapid development. Unfortunately, with such a large user base, it is not uncommon to see mistakes within development. Often developers are unaware that what they are doing is insecure. This book addresses important security concerns every developer should be aware of.

The first ten chapters are on programming practices of which, if you’re a system administrator, may not interest you. If you are a developer you should know, understand, be able to fix and, of course (the fun part), exploit for demonstration.

Chapters 11, 12 and 13 are essential reading to any system administrator who will be supporting a LAMP or WAMP stack.
The IIS chapter may not apply to those reading this blog since we all know that securing IIS is not necessary when you’re running Linux. The chapters on securing PHP, MySQL, and Apache outline the basic concepts and give some important pointers that may not be obvious to everyone.

Chapter 14 (Introduction to Automated Testing) and Chapter 15 (Introduction to Exploit Testing) have really opened my eyes to methods I have not used before. We’ve all heard of Selenium and PHPUnit but what about CAL9000 and PowerFuzzer? I’ll be off to try them soon. I can always appreciate applications designed to help secure applications. Nessus, Nikto and MetaSploit lack any mention in this book but now that you’ve read this review, you’ll know to look into those as well.

Chapter 16 is on designing secure applications and 17 is on patching, which would have been useful for me to explain to someone as to why they shouldn’t be working on their production site (to make things worse with no version control.)

There are so many products out there that are vulnerable to some of the attacks. We see them everyday in the security lists. I think that any company and developer of PHP based Web Applications should have a keen grasp on the concepts outlined within the pages of this book.

I do not think, however, that “Securing PHP Web Applications” is a book that is necessarily intended for every developer out there. I think its a great book for anyone with an active interest in security that has been developing for a while but would like some pointers on how to secure their web apps or a reference for developers in need.

For more information and a sample chapter, please visit the publisher page: http://www.informit.com/title/0321534344 or if you subscribe to Safari Books Online you can access the complete book here: http://techbus.safaribooksonline.com/9780321534347

REVOLUTION OS: A REVIEW

Filed under: Linux for Newb's — aaron at 7:42 am on Tuesday, December 30, 2008

Well, it seems as though I’ve managed to find a way to fill up the HDD’s on both my mac lappys.  Tried installing Ubuntu on the G4, but I’ve currently been using it as something of a Media PC and though my files are backed up, it’s the only computer in the apartment that I can hook up to my TV (that works anyway). 

Tried partitioning the HDD on the G4, but I don’t have enough space for UBUNTU (quite a bit of space for a Linux distro.)  However, I DO have an old TOSHIBA lappy sitting around without a screen that works (though the video card works, so video out, yay). I’m just going to wipe it and hook it up to a monitor, learn that way I guess.  This I’ll do later today (it’s 6:04am).  

Went by the library today and picked up a few Linux newb books (no LINUX FOR DUMMIES, I WAS SADDENED). So I’ll be reading that.  In the meantime, here’s a review for a documentary about Linux I just got my hands on, relatively speaking.  The documentary: REVOLUTION OS.

So, what can I say about this flick other than I’ve watched it twice now and it seems like it’d be a pretty good documentary for someone (like yours truly) dipping his toe into the wide wide world of Linux.  It’s somewhat of a history lesson more than a “this is how you get started” lesson.  The reason I’ve watched it twice, other than it being intriguing, is so I could take notes the second time ’round to get a better idea of what I could tell you guys about it.

We start off with something of a cocaphony of talking heads, Eric Raymond (author of THE CATHEDRAL AND THE BAZAAR) and BRUCE PERENS (author of the OPEN SOURCE DEFINITION, along with some guys at DEBIAN), going on about this and that, not really making much sense at first.  Then we dive into the history lesson. 

We skip all of the AT&T Unix development and head straight into Stallman and his work on AI at MIT.  At some point he became frustrated with passwords and Operating systems he couldn’t work with.  He quit his job at MIT and began working on GNU (something I’ve discussed earlier).  The problem with GNU is that the FREE SOFTWARE camp had created all that was needed for a working Operating System, but lacked a working, debugged Kernel.  

This is where our good pal Linus came in, saw the GNU software and decided to write a workable, monolithic KERNEL when, combined with the GNU software, gave birth to what we have all come to know as an early stage of Linux. 

Flawed, of course, at first, but working and, believing in the GPL, he distributed this software.  That’s when things really became interesting.  As people all over the world got their hands on this Open Source code, they were able to mess around with it, play with it, improve upon it, and before long, we began to see multiple variations, each an improvement or failure upon the other.

Stallman, of course, played the part of a d-bag, for certain, and there followed all sort of revelations upon the history of linux, the evolution, etc.  I’m not going to continue rambling on about it.  All I can say is, if you have an interest in Linux, whether new or old, this is definitely a flick you’ve got to check out.  So, rent it, download it, do what you’ve gotta do, but I’m tellin’ ya, check it out.  It’s one step closer(for me anyway) to understanding.

Anyway, I’ve got some sleep to catch on, followed up by installation on that Toshiba and a great amount of reading, so, check out REVOLUTION OS.  I give it 4 out of 5 penguins.

Until next time, fellow newbs…

Free Linux & Tech Related Books.

Filed under: The Linux Blog News — TheLinuxBlog.com at 3:34 am on Tuesday, September 16, 2008

Share photos on twitter with Twitpic Hey there, this is Owen from TheLinuxBlog.com
Was just wondering, if any of you guys would be interested in some free books. I’ve got a ton of Linux and tech related books, I’m not ready to give them all up but here are two books I just got given. I want to read the VI/EX one and may keep it around. But I have another copy of the Perl one that’s in a little better shape, so the Perl one is definitely going. Leave a comment here or on twitter if your interested. You’ll have to pay shipping but it shouldn’t be expensive with media mail.

I’ve got a bunch of other books that I’d like to trade, sell or give away, but haven’t found a good “books” module for WordPress yet. Does any one else have books they no longer want or need? Would you guys be interested in trading or getting free books if you pay shipping? If there is interest, I’ll start a forum. I have access to a ton of non tech related books, but I’d rather keep it to a topic that I know. I’ll be posting more free books in the future so follow me on twitter and sign up for the RSS feed.

Using BASH to sort a book collection. ISBN Data Mining – Part 2

Filed under: Shell Script Sundays — TheLinuxBlog.com at 8:49 pm on Sunday, September 23, 2007

Last weeks article used a bit of data mining to grab information on ISBN’s from Barnes and Noble and dumped the information into a text file. This week we’ll take those text files and format the data for input into a MySQL database. This tutorial assumes that you are familiar with MySQL.

The data that was written to the text files was in the following format:

Title: DNS and BIND, Third Edition
Title:
Author(s): Paul Albitz, Mike Loukides (Editor)
Publisher: O’Reilly Media, Incorporated
Pub. Date: September 1998
ISBN: 1565925122
Format: Paperback, 480pp
Edition Number: 3
Edition Description: Older Edition
Customer Rating:

This can easily be parsed and formatted for insertion into a MySQL table.

Firstly a database has to be created and then a table structure has to be decided upon. Since this example already has the titles, I’ll just use simular ones for the field names.
Create a database called book_info:

mysqladmin -u root create book_info;

and now create a table within the book_info database that is to contain all of the data:

CREATE TABLE `books` (
`ISBN` INT( 10 ) NOT NULL ,
`title` VARCHAR( 50 ) NOT NULL ,
`author` VARCHAR( 80 ) NOT NULL ,
`publisher` VARCHAR( 50 ) NOT NULL ,
`pub_date` VARCHAR( 50 ) NOT NULL ,
`format` VARCHAR( 30 ) NOT NULL ,
`edition` INT( 2 ) NOT NULL ,
INDEX ( `ISBN` )
) ENGINE = MYISAM ;

This isn’t the best MySQL table structure ever, but it will do for the purposes of this artice and besides it can always be tuned later.

With a directory full of .txt’s files from the last issue of shell script sundays the following can be ran to create a text file called bookQuery.sql.

for i in $(ls); do
echo “INSERT INTO \`book_info\`.\`books\` (\`ISBN\`, \`title\`, \`author\`, \`publisher\`, \`pub_date\`, \`format\`, \`edition\`) VALUES (‘$(cat $i | grep ISBN:)’, ‘$(cat $i | grep Title | sed ‘q’ | sed “s/’/\\\\’/”)’, ‘$(cat $i | grep Author\(s\): | sed “s/’/\\\\’/”)’, ‘$(cat $i | grep Publisher: |sed “s/’/\\\\’/”)’, ‘$(cat $i | grep Date:| sed “s/’/\\\\’/”)’, ‘$(cat $i | grep Format: | sed “s/’/\\\\’/”)’, ‘$(cat $i | grep Edition\ Number: | sed “s/’/\\\\’/”)’);” >> bookQuery.sql; done;

In turn this file can be imported into the table that was created by running the following:

mysql -u root < bookQuery.sql

Whats happening is pretty simple, cat reads the file and grep is used to find the line of text we want to import. After that sed is used. It is used twice in the title field. The first time is to use the first title from the text file. It is also used on every other appropriate field to escape the string so that it does not break the query. This example does not take the titles out of the line, but this could be easily done with cut.

Its easy to import text files into MySQL with shell scripting but the language I feel is best suited for this task is PHP. Some time I’ll go over how to do this with PHP.

Using BASH to sort a book collection. ISBN Data Mining – Part 1

Filed under: General Linux,Shell Script Sundays — TheLinuxBlog.com at 2:47 am on Sunday, September 16, 2007

Many problems can be solved with a little bit of shell scripting.
This week I plan to show you a script that does a little data mining from Barnes and Noble.
I have a lot of books and wanted cataloged information on them. Each book has a unique identifier called an ISBN. So I collected all of my ISBN numbers and a simple loop that wrapped around a script a friend of mine made to find basic information.
Here is his script:

#!/bin/bash
ISBN=”$1″

function fetchInfo () {
### Using barnesandnoble.com to fetch info…
lynx -source “http://search.barnesandnoble.com/booksearch/isbninquiry.asp?ISBN=${ISBN}” |\
tr -d ‘[:cntrl:]‘ | sed ‘s/>\n

### Parsing book title.
if [ "${lineArray[0]}” == ”
echo “4|Title: ${lineArray[*]}” | sed ‘s/<[^>]*>//g;s/ ([^)]*)//g’### Parsing book author.
elif [ "$(echo ${lineArray[*]} | grep “id=\”contributor\”")” ]; then
echo “3|Author(s): ${lineArray[*]}” | sed ‘s/by //;s/<[^>]*>//g’

### Parsing additional data.
elif [ "${lineArray[0]}” == ”
[ "$(echo ${lineArray[*]} | grep -ve “bullet” -ve “title”)” ]; then
echo “1|${lineArray[*]}” | sed ‘s/<[^>]*>//g;s/:/: /;s/ / /’
fidone | sort -ur | awk -F\| ‘{print $2}’ | grep “:”

}

if [ "${#ISBN}" -ge "10" ]; then
fetchInfo
fi

The script should be called as followed (assuming the script name is eBook.sh):

sh eBook.sh ISBNNUMBER

The first step is to see if the ISBN is greater than 10 characters, if it is it goes to the fetchInfo() function.
It then takes the given ISBN number and searches the barnsandnoble.com site for any matches. To do this lynx is used, the -source option tells lynx to output the source instead of using browsing mode. The output of lynx is piped to tr and sed. tr is used to delete all line breaks from the source, the sed expression adds a line break at the end of each HTML tag. The while loop loops over each line from from the piped lynx, tr and sed.
Within the loop is where anything from the output of the search page can be pulled out. This script pulls out the book title, the author and additional data.

I formatted my ISBN’s in a text list and used the following loop to fetch information on my books and save them with the ISBN as the file name.

for i in $(cat list.txt); do sh eBook.sh $i > $i.txt; done;

In the next issue I plan to expand on this to format data in an even more presentable manor.
Used applications
tr, lynx, sed, awk, sort, grep