Posts Tagged Open Source

Book Review: Wordpress Theme Design

Wordpress Theme DesignOver the past few months I’ve had the book “WordPress Theme Design” on my desk ready to be reviewed (it’s another book from Packt publishing). I finally got to it earlier this week. You can read my review over at Amazon. I gave it 3 stars mainly because it wasn’t complete and lacked some of the details I’d like to see in a “guide” book. But I can’t say I didn’t learn anything.

One of the reasons I picked up this title was because I’ve been itching to redesign Tod means Fox. I use WordPress (and like it very much) and have all the tools (and some questionable skills) for a redesign. But don’t worry, any redesign will have the same glorious orange that helps remind me of FoxPro, Firefox, ING, Packt, and Holland! But honestly, It’s been a while and I’m restless. I also want a redesign to be done entirely on my new iMac. If I do it quick enough, it will be my first real work performed on the new machine.

It turns out though that the book wasn’t very helpful. I’m sure it will sit on my shelf until some day in the distant future when its time to “clean up” the office. I’ll likely be on revision n of Tod means Fox, and who knows where WordPress will be. But I suppose that’s the nature of buying technology books.

Very few tech books stand the test of time. Those that do are usually pure reference and theory books and not how-to books.

I keep reference books (like the PHP Cookbook, The Complete Reference: MySQL, and of course the Hacker’s Guide to Visual FoxPro) at arms length. These books I go to often. Then there are the theory books. These are books I keep further away but access often — and usually not in front of the computer. Books like Kimball’s The Data Warehouse Toolkit and Zeldman’s Designing with Web Standards fit into this category.

OK, enough babbling. I’d be interested to hear your thoughts on a redesign, WordPress, time-tested tech books, or the fabulous color orange.

Tags: , , , , ,

No Comments

The Future of Open Source in BI

At last Thursday’s TDWI Benelux Chapter meeting, Davy Nys of Pentaho gave an overview of how open source could/might/will change the face of Business Intelligence. He gave a reasonably good vendor-neutral presentation (important for TDWI events). His session was a nice compliment to the “BI Trends” presentation given by Steve Hoberman an hour earlier.

Perhaps there is a trend for organizations to turn to more open-source software solutions for BI projects. After all, Davy’s company and others like Talend and CloverETL are making great strides in competing for market share.

As the big players in BI continue to merge and consolidate, it is pretty exciting to see several open source vendors and tools emerge. Is this a reflection of the community’s general dissatisfaction regarding commercial software? Are the open source solutions better? Is this truly a trend to be reckoned with? Should MS and others be worried?

Open Source Considerations

Davy stressed the importance of reducing the TCO of BI software. Without licensing fees, open-source can do just that. As Rick Sherman predicts in an article for DM Review, TCO will become a much more significant factor in the adoption of any and all BI trends. Licensing costs could impact TCO in such a dramatic way that a company can save a significant amount on their investment by switching to open source.

TCO isn’t the only consideration. Before evaluating open-source software, Davy suggests to examine the vibrancy of the community. A vibrant community with contributors and enthusiasts is a good sign for future product development and support.

Licensing is yet another very important consideration. As part of his presentation, Davy initiated a discussion on viral verses non-viral licensing. here’s is how I understand it: In a “viral” agreement, any source code changes to the product must be returned back to the public. Non-viral agreements allow companies to modify the source as they see fit without having to report back to the community. With viral licensing, I would have tremendous concerns about intellectual property and protecting business practices and methods.

What I found strange about the Q&A session and roundtable discussion that followed his presentation was the focus on the Pentaho business model. The concern of some BI professionals is thus: How can the economics associated with running an open source software company be sustainable over a long period of time? The question is relevant because as BI Professionals, we need to supply solutions that will be supportable, scalable, and usable in the future. The concern is that a company — like Pentaho — might not live and thrive long enough to meet the long-term needs of the business. I am not qualified to answer this question, but I admit, I wonder myself. Davy did an excellent job of presenting the case, however. If you need details on how Pentaho and other open source organizations make their money, it would be best to contact them directly. These are valid concerns and should be part of tool analysis that should go on early in a project’s planning.

I am open to the possibilities that open source can provide for BI applications. I use open source software all the time (from Wordpress to MySQl to Codeplex), but for a mission critical business initiative? Before making a decision like that, I would certainly need to have more information and a project to try it out on.

To learn more about Davy, you can check out his LinkedIn profile or visit the Pentaho website.

Tags: ,

1 Comment

Finally… Sedna

Some exciting news this weekend for the VFP community: Sedna has been released. Craig Berntson, Kevin Cully, and others have already blogged about it. Sedna contains some very exciting and interesting components:

  • VistaDialogs4COM - a collection of COM-visible classes that wrap the functionality provided by the Microsoft VistaBridgeLibrary which will provide access to the Windows Vista TaskDialog and Common Dialogs
  • Upsizing Wizard - excellent enhancements include bulk insert support, performance improvements, UI improvements, and support for table names with spaces
  • Data Explorer - lots of improvements including better drag and drop support and for showplans
  • NET4COM - a collection of COM classes that wrap a subset of the .NET Framework 2.0
  • MY for VFP - similar to NET4COM, MY is a native implementation which makes available many new functions for VFP developers
  • DDEX for VFP - The Data Designer EXtensions allow Visual Studio to work better with Visual FoxPro data sources

Now that the release is out, I plan to start using and experimenting with the various components (something I had decided to do ‘later’ rather than ’sooner’). It will be fun to see how others are making use of these as well!

Tags: , ,

2 Comments

Under rock? SP2 and Sedna betas released.

Others have blogged about this already, but just in case you use my humble blog for all your Visual FoxPro news and announcements (a man can dream, can’t he?), Microsoft has released FoxPro 9 Service Pack 2 and its “Sedna” extensions in beta.

Enjoy!

Tags: , ,

No Comments

Analyze Apache Raw Access Logs in FoxPro

I’ve been increasingly interested in examining the access logs on my server. For the past 6 or 7 years, I’ve used some of the cool little tools provided by cPanel located in their Web/FPT Statistics folder (like Webalizer and Awstats). While nice to look at, I’ve always felt a bit handicapped by the interface and general content. I have my own ideas on what I’d like to see and how I want to see it.

In this and subsequent articles, I’ll build an Apache Raw Access Log analysis application that will (a) download the access logs once or twice a day, (b) dump the data into a database, (c) integrate this data with other information (perhaps some demographics info, error logs, site information, date and times of blog posts, etc) (d) and in the end, build a suite of reports and filters that can be used to identify things like abuse, spam, and positive traffic.

My hope is to do a good enough job with this that, in the end, could end up in the Fox Open Source community if there’s even a remote bit of interest. This should evolve in such a way that any access log from any server would be supported, but in the initial stages, I’ll be using my Raw Access Logs from Apache. For those interested, here are the details of my server configuration:

Operating system: Linux
Apache version: 1.3.37 (Unix)
cPanel Build: 10.9.0-STABLE 9966
cPanel Pro: 1.0 (RC36)

The Log File

I started by looking at the raw files created by Awstats on my server (/tmp/awstats/). There is a ton of information in there which is already parsed and used by the various free analysis tools. But what I really need is a raw file that contains a line for each ‘hit’ to my server (including 200, 404, and 500 messages). The Raw Access Logs are perfect (in cPanel, you can manage them by opening the Raw Log Manager). They contain a line for each hit, some referral information, http status codes, etc.

The only problem with the file is its format (NCSA combined/XLF/ELF)! A single line looks like:

206.17.xxx.xxx - - [23/May/2007:07:59:21 -0500] “GET /Styles/color.css HTTP/1.1″ 304 - “http://www.rabbitstewlounge.com/” “Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322; InfoPath.1)”

Fortunately, FoxPro can handle this sort of thing quite easily. With a log file containing potentially thousands of lines each day, you can see how reading this file without parsing can be nightmarish (not to mention highly inefficient). So, this is where I started. I downloaded today’s access file from my site, and wrote the following code. As this project matures, I’ll be sure to clean this up (hopefully with some reader’s suggestions!) and provide the source in zip format. For now, follow along:

Get Started

First, download your raw access file. Load cPanel and click “Raw Access Logs”. Select the raw access log for your domain and unzip it. In this example, I’ve also changed it’s name from “rabbitstewlounge.com” to “raw_log.txt”.

The Basic Code

I left out some environmental settings, such as SET SAFETY and SET MEMOWIDTH for now. Eventually this will be part of a project, which will set all these things later. Also, as this code is merely used to test the theory, I haven’t included any real error checking. I’d be interested in hearing some ideas on how to tweak this for better speed and reliability.

I did consider writing this using low-level file functions (FOPEN, FGETS, FREAD, etc), but in the end I felt that the format was too wacky and I had better rely on STREXTRACT and SUBSTRING instead.

CREATE DATABASE C:/webstats/webstats
OPEN DATABASE C:/webstats/webstats
CREATE TABLE C:/webstats/webstats.dbf (;
    stat_id integer AUTOINC,;
    ip_address character(15),;
    date_time datetime,;
    gmt_offset character(5),;
    access_method character(4),;
    location varchar(200),;
    http_version character(10),;
    http_code character(3),;
    bytes integer,;
    referrer varchar(200),;
    agent varchar(200),;
    source_file varchar(60))
 
lcData = FILETOSTR("C:/webstats/raw_log.txt")
 
FOR n = 1 TO MEMLINES(lcData)
 
    lcLine = MLINE(lcData,n)
 
    *-- IP address is first.
    lcIP = ALLTRIM(SUBSTR(lcLine,1,AT("- -",lcLine)-1))
 
    *-- date time and GMT offset info. Use STREXTRACT
    *-- to get the data between the first two quotes
    *-- on the line. Then break the datetime string
    *-- into separate lines to use MLINE to build a
    *-- proper datetime string
 
    lcDateTimeGMT = ;
        STRTRAN(STREXTRACT(lcLine,"[","]")," ",CHR(13))
    lcDT = ;
        STRTRAN(STRTRAN(MLINE(lcDateTimeGMT,1),"/",CHR(13)),":",CHR(13))
    IF !EMPTY(lcDT)
        ltDatetime = DATETIME(;
            VAL(MLINE(lcDT,3)),;
            get_monthnum(MLINE(lcDT,2)),;
            VAL(MLINE(lcDT,1)),;
            VAL(MLINE(lcDT,4)),;
            VAL(MLINE(lcDT,5)),;
            VAL(MLINE(lcDT,6)))
    ELSE
        ltDatetime = {}
    ENDIF
 
    lcGMTOffset = MLINE(lcDateTimeGMT,2)
 
    *-- Request data. Just to 'switch-it-up' a bit,
    *-- I'm using GETWORDNUM here because
    *-- I need 3 chunks of data within the
    *-- STREXTRACT, all conveniently separated
    *-- by a space.
 
    lcRequest = STREXTRACT(lcLine,'"','"')
    lcMethod = GETWORDNUM(lcRequest,1)
    lcLocation = GETWORDNUM(lcRequest,2)
    lcHTTPVer = GETWORDNUM(lcRequest,3)
 
    *-- HTTP Code and bytes returned.
    lcHTTPCode = SUBSTR(lcLine, ;
        AT(lcRequest,lcLine)+LEN(lcRequest)+2,3)
    lnBytes = VAL(SUBSTR(lcLine,AT(" " + lcHTTPCode + ;
        " ",lcLine)+LEN(lcHTTPCode)+2,;
        AT('"',lcLine,3) - (AT(" " + lcHTTPCode + " ",lcLine)+;
        LEN(lcHTTPCode)+2)))
 
    *-- referrer
    lcReferer = STREXTRACT(lcLine,'"','"',3)
 
    *-- User's agent
    lcAgent = STREXTRACT(lcLine,'"','"',5)
 
    INSERT INTO webstats (ip_address,date_time,gmt_offset,;
        access_method, location,http_version,http_code,;
        bytes,referrer,agent,source_file ) ;
    VALUES  (lcIP , ltDatetime , lcGMTOffset , lcMethod ,;
        lcLocation , lcHTTPVer ,lcHTTPCode,lnBytes,lcReferer,;
        lcAgent,"raw_log.txt" )
 
NEXT
 
*-- Functions
FUNCTION get_monthnum
LPARAMETERS tcAbbr
 
DIMENSION aMonthList[12]
aMonthList[1] = "JAN"
aMonthList[2] = "FEB"
aMonthList[3] = "MAR"
aMonthList[4] = "APR"
aMonthList[5] = "MAY"
aMonthList[6] = "JUN"
aMonthList[7] = "JUL"
aMonthList[8] = "AUG"
aMonthList[9] = "SEP"
aMonthList[10] = "OCT"
aMonthList[11] = "NOV"
aMonthList[12] = "DEC"
 
RETURN ASCAN(aMonthList,LEFT(UPPER(ALLTRIM(tcAbbr)),3))
ENDFUNC

Next entry, I’ll see about downloading this file automatically (might take some ingenuity) and building in some logic to do so periodically. After that, I’ll write some algorithms to identify potential abuse situations, spam, and increased traffic, setting up email notifications in the process. Stay tuned!

Tags: , , , , , ,

4 Comments

Microsoft and Open Source

As you know, Microsoft and Open Source have had an oil/water type of relationship. Here’s an article that gives us 10 things that MS loves and hates about Open Source. I post this here because FoxPro made the list:

The year-old open source project hosting Web site started by Microsoft lets users share open source development projects. The big news is that portions of Visual FoxPro will be posted as open source on Codeplex. A new version of the Web site is released every three weeks adding additional features and updates. As of early March, there were 1,029 projects on the site.

Tags: , ,

No Comments

CoDe’s Sedna Issue

I got my Sedna issue of CoDe magazine the other day, and just finished reading through it. I was a little excited when it came in, and was rather pleased with the content. This was their third Fox Focus issue (why not more?). Articles by Doug Hennig, Bo Durban, Rick Schummer, Rick Strahl and others dove right into some of Sedna’s great new improvements. Although most of the content wasn’t “new” — in that I, like most VFP developers, have known about these wonderful enhancements for some time. But it is great to see them in print, in an issue especially designed for Fox.

I do admit that I skimmed over the VFP to .net stuff. I’m just not interested in porting my VFP applications to .net. Whenever I read through these sorts of things I just find myself frustrated, puzzled, and dismayed all at once. First, moving to .net would require a complete re-write. Second, I’ve developed a few .NET apps in my day and still feel that VFP (for many projects) is light years ahead of .net. Of course, I’m excited about the new C# (my .net language of choice), the cool features of the Development Studio, and LINQ. But for a Fox Focus issue, it would have been great to umm… focus more on Fox! But I digress..

Now that I have that off my chest, I’d like to comment on a few of the articles I found most interesting. First I was really happy to see Rick’s article “Visual FoxPro Web Services Revisited”. Rick gives us the goods on the Web Service Client process, ASMX, Windows Communication Foundation (WCF), and the status of SOAP. Communicating with the Web has never been fully straightforward in VFP, but with a little guidance and shove once in a while, future VFP development using Web Services looks bright.

Craig Boyd (”Welcome to the Future of Deployment”) and John M. Miller (”Integrating VFP into VSTS Team Projects”) show us how to use some of Visual Studio’s coolest features with VFP. Craig discusses ClickOnce — a deployment technology allowing you to do installs and upgrades on the Web — and how you can use it with VFP. This is a must read for anyone looking to update their distribution strategy. The company I just started working for is just beginning to do Web installs (after years of mailing CDs). This is one of the first articles I’ll be showing management.

Miller’s article really took me by surprise. Visual Studio Team System (VSTS) is Microsoft’s SDLC tool integrated into Visual Studio 2005. Although I haven’t used it in the past, this article sparked my interest. VSTS promises to help manage the often difficult task of integrating resources on complex projects. The only problem is that VSTS is a .net thing, and really not designed to use non-dotnet tools out of the box. However, as John explains, you can use VSTS extensibility features to make it happen. Thanks John!

Lastly, this issue is packed with little sidebars and tidbits. Things like ClassBrowserX, Scrollable containers for VFP, and GDIPlus-X. I think this issue has also inspired me to join CodePlex and maybe jump on one of the VFP projects (at least as a tester).

Take a look for more: http://www.code-magazine.com/focus/index.aspx

Tags: , ,

3 Comments