Initial import
brought over all the files from the Jekyll version, fixed categories, reformatted for different markdown processor
This commit is contained in:
44
source/_posts/2011/database-abstraction-v0-8.md
Normal file
44
source/_posts/2011/database-abstraction-v0-8.md
Normal file
@@ -0,0 +1,44 @@
|
||||
---
|
||||
layout: post
|
||||
title: Database Abstraction v0.8
|
||||
author: Daniel
|
||||
date: 2011-10-22 21:00:48
|
||||
categories:
|
||||
- [ Databases, MySQL ]
|
||||
- [ Databases, PostgreSQL ]
|
||||
- [ Databases, SQL Server ]
|
||||
- [ Databases, SQLite ]
|
||||
- [ Programming, .NET, C# ]
|
||||
- [ Projects, Database Abstraction ]
|
||||
tags:
|
||||
- abstraction
|
||||
- ado.net
|
||||
- c#
|
||||
- linq
|
||||
- linq to sql
|
||||
- nhibernate
|
||||
summary: An open-source project to allow queries to be defined in code and not tied to a specific database implementation
|
||||
---
|
||||
|
||||
When we began developing C# web applications, we found ourselves in the position of determining what the best way of accessing the database is. We evaluated several technologies...
|
||||
|
||||
* **NHibernate** - May be very good, but it was overkill for what we were trying to do.
|
||||
* **LINQ to SQL** - This brings C#'s LINQ (Language-Integrated Query) to SQL databases. You create database-aware classes and use LINQ to select from collections, which LINQ to SQL converts to database access. This is a good abstraction, but it relies on SQL Server; as we typically deploy to PostgreSQL, this didn't work. (We also couldn't get DBLinq, a database-agnostic implementation, to work.)
|
||||
* **ADO.NET** - This is the tried-and-true database access methodology, released as part of the initial release of the .NET framework. The downside to this is that it encourages SQL in the code at the point of data retrieval; it does not provide a clean separation of data access from data processing.
|
||||
* **EF Code First** - This didn't exist; it's also very SQL Server-centric. Not faulting Microsoft for that, especially since they release a free version now; but, as we deploy on Linux, until they release a Linux version, SQL Server is not an option.
|
||||
|
||||
With our PHP applications, we had written a database service that read queries from XML files. Then, queries were accessed by name, with parameters passed via arrays. The one thing that ADO.NET has that was useful was the fact that it is based on interfaces. This means that if we wrote something that exposed, manipulated, and depended on `IDataConnection` (instead of `SqlConnection`, the SQL Server implementation of that interface), we could support any implementation of database. The `SqlDataReader` implements `IDataReader` as well. Our solution was becoming apparent.
|
||||
|
||||
Over time, we developed what is now the [Database Abstraction][proj] project hosted on <del>CodePlex</del> _(UPDATE: migrated project to [GitHub][])_. On Thursday, we released the first public release (although the DLLs are in the repository, and are usually current at every commit). If you are looking for a way to separate your data access from the rest of your code, or want a solution that's database-agnostic, check it out. It supports SQL Server, MySQL, PostgreSQL, SQLite, and ODBC connections *, using the data provider name to derive the proper connection to implement. There is also a Mock implementation to support unit tests; this mock can provide data, providing a useful way to test methods. Finally, there is a membership and role provider based on Database Abstraction; simply configure the connection string, create the database tables, and away you go! **
|
||||
|
||||
A pre-released version is already in production use in our [PrayerTracker][] application, and others are being built around it. If this sounds like something that could help your project, certainly feel free to [check it out][rel]!
|
||||
|
||||
<small>_\* Oracle is omitted from this list, as their DLL had redistribution restrictions; this meant that the source code repository, upon check-out, would have build errors. There may be an Oracle implementation in the future (it would be trivial), but there is not one now._
|
||||
|
||||
<small>_\** The membership and role providers are untested; they will be tested and tweaked by version 0.9._</small>
|
||||
|
||||
|
||||
[proj]: //dbabstraction.codeplex.com "Database Abstraction • CodePlex"
|
||||
[PrayerTracker]: //prayer.djs-consulting.com "PrayerTracker"
|
||||
[rel]: //dbabstraction.codeplex.com/releases/view/75241 "Database Abstaction v0.8 • Database Abstraction"
|
||||
[GitHub]: //github.com/danieljsummers/DatabaseAbstraction
|
||||
@@ -0,0 +1,34 @@
|
||||
---
|
||||
layout: post
|
||||
title: "HCSB Verse of the Day (Plus) 3.0.1 - WordPress Plug-In"
|
||||
author: Daniel
|
||||
date: 2011-09-03 22:30:09
|
||||
categories:
|
||||
- [ Programming, PHP, WordPress ]
|
||||
tags:
|
||||
- esv
|
||||
- hcsb
|
||||
- kjv
|
||||
- niv
|
||||
- nkjv
|
||||
- plug-in
|
||||
- update
|
||||
- widget
|
||||
- wordpress
|
||||
summary: New features available in this plug-in
|
||||
---
|
||||
|
||||
After a nearly four-year run at version 2, the HCSB Verse of the Day plug-in has been updated to version 3. The latest version available is 3.0.1, which contains a quick fix that was found just after I had released version 3. When you see that ".0.1," just think, "Oh, this was written by a human!"
|
||||
|
||||
Major changes in this version include:
|
||||
|
||||
* The addition of "(Plus)" to the name, as this version supports five different translations - in addition to the Holman Christian Standard Bible (HCSB), it now supports the English Standard Version (ESV), the New King James Version (NKJV), the New International Version (NIV), and the King James Version (KJV).
|
||||
* A new settings page, where you can select the version.
|
||||
* A widget, that will drop right in any widget zone.
|
||||
* The replacement of several function calls that have been deprecated in the WordPress API over the past 3 years and 8 months.
|
||||
* Formal dropping of support for PHP 4, following WordPress's lead in 3.2.
|
||||
|
||||
While a lot of the code is different, if you only used the template tags, you should notice nothing different with this release. You can [download HCSB Verse of the Day (Plus) 3.0.1][pi] at the WordPress Plug-In Directory, or upgrade on the WordPress Plug-In Administration Page in your blog.
|
||||
|
||||
|
||||
[pi]: //wordpress.org/extend/plugins/hcsb-verse-of-the-day/ "HCSB Verse of the Day (Plus) • WordPress Plug-In Directory"
|
||||
27
source/_posts/2011/spring-clean-your-windows-machine.md
Normal file
27
source/_posts/2011/spring-clean-your-windows-machine.md
Normal file
@@ -0,0 +1,27 @@
|
||||
---
|
||||
layout: post
|
||||
title: Spring Clean Your Windows Machine
|
||||
author: Daniel
|
||||
date: 2011-05-07 15:48:26
|
||||
categories:
|
||||
- Security and Privacy
|
||||
tags:
|
||||
- compcln
|
||||
- security
|
||||
- spring
|
||||
- vista
|
||||
- windows
|
||||
- winsxs
|
||||
summary: Reclaim significant space on your Windows drive by deleting old versions of system libraries
|
||||
---
|
||||
|
||||
Spring has sprung, the grass has riz; do you know where your HD space is? If you're running Windows Vista or Windows 7, you may have some unclaimed disk space waiting for you. (Disclaimer: I am not telling you to do anything to your computer, and I maintain no liability for the effects of the commands you enter. I'm sharing what worked for me.)
|
||||
|
||||
Windows Vista was a rewrite of Windows; as part of this, they developed Windows Side by Side (WinSxS) to deal with the conflicting/removed DLL issue that plagued Windows in the past. SxS maintains components, and programs continue to use their components unless they specifically ask to use a new one. This keeps upgrades from breaking older programs, and makes all upgrades reversible. With Vista currently at SP2, you probably have lots of versions of several of these components, and if you have a smaller drive, they can be pinching your disk space. If you're content with the way your computer is running, SP2 includes a utility called COMPCLN.EXE which will make these upgrades permanent by removing unused components. WinSxS knows which components are referenced by current software, so you can run this without worrying that you'll break an older program.
|
||||
|
||||
To run it, click the Windows icon on the bottom left of the task bar, type "cmd", then press Enter. When the command prompt window opens, type "compcln" and press Enter. It will give you a y/n prompt, then clean the old components off your computer. Windows also makes restore points, which is a saved group of files and settings that exist before installing updates. If you're cleaning the components, you can also delete these as well. To run this, open the control panel and search for "disk cleanup". Choose your C: drive, then click the "More Files" tab. The restore point button is in the middle of that page.
|
||||
|
||||
Finally, Microsoft has released [Microsoft Security Essentials][mse], an anti-virus/anti-malware program for Windows XP through 7. If you're tired of "buy the real version" nags or renewing subscriptions, this is the tool for you. It's a tool that many feel should have been included in Windows for a long time (though the reasons why it hasn't been are outside the scope of this how-to), it works well, and it's free.
|
||||
|
||||
|
||||
[mse]: //www.microsoft.com/security/pc-security/mse.aspx "Microsoft Security Essentials"
|
||||
46
source/_posts/2011/tech-blog-3-0.md
Normal file
46
source/_posts/2011/tech-blog-3-0.md
Normal file
@@ -0,0 +1,46 @@
|
||||
---
|
||||
layout: post
|
||||
title: 'Tech Blog 3.0 (aka "You win, PHP...")'
|
||||
author: Daniel
|
||||
date: 2011-08-24 22:12:44
|
||||
categories:
|
||||
- General Info
|
||||
- [ Programming, .NET, Mono ]
|
||||
- [ Programming, PHP ]
|
||||
- [ Web Servers, Apache ]
|
||||
tags:
|
||||
- apache
|
||||
- blog
|
||||
- blogengine
|
||||
- mpm
|
||||
- php
|
||||
- pre-fork
|
||||
- theme
|
||||
- thread
|
||||
- wordpress
|
||||
- worker
|
||||
summary: This site has returned to WordPress
|
||||
---
|
||||
|
||||
After a little over a year running on [Tech Blog 2.0][], you are now viewing version 3.0. For this version, we've returned to [WordPress][] from [BlogEngine][]. There are several issues that colluded to drive this change, most of which surrounded PHP and its crazy behavior. (Geeky details follow - skip to the paragraph starting with "Bottom line:" if you don't want the geek stuff. I bolded it so it would be easy to spot.)
|
||||
|
||||
PHP's recommended configuration is to run under Apache using the pre-fork multi-processing module (MPM). The advantage to this is that Apache does not have to spin off another process to handle each request; it handles it in the same thread. However, this means that each instance of the server must have all enabled modules loaded. This means that each instance of the server (AKA "thread") is very large, so the number of threads run is lower (typically 5-15 in a server the size we're on). Also, this means that each thread can only handle one request at a time; if you have 7 threads configured, each serving one of 7 requests, and an 8th request comes it, it has to wait for one to finish. If the requests are served quickly, this may not be a problem; however, the avalanche of request that follow the typical front-page mention on mega-blogs can easily overwhelm it.
|
||||
|
||||
To fix this problem, there is another MPM, this one called worker. In this scenario, there are spare thread waiting to fill requests, and these can spawn other threads to do further work if required. So, the Apache threads would realize that a request needs to be handled by PHP, and pass it off to that process to be completed. The Apache memory footprint is much smaller; it serves the images, scripts, and other static files, and passes off the requests that require heavy lifting. PHP, then, has a (FastCGI) process where it receives these requests, processes them, and returns the response to the caller. Because each of these threads only has to load the PHP requirements, they are smaller too, so you can have more threads processing at the same time; you just might survive that front-page mention! (This is the same technique applied by LightTPD and Nginx, two other servers I tried at various times.)
|
||||
|
||||
It is in this scenario where PHP fails to live up to its expectations. These PHP processes would simply stop responding, but the controller thinks they're still there. The end result to the user is a site that just sits and waits for output that will never come. Eventually, they may receive a Gateway Timeout or Bad Gateway error. The problem is worse on slower sites, but even popular sites seemed to fall victim to this from time to time. This was also a problem whether PHP controlled its threads, or Apache controlled them.
|
||||
|
||||
The one thing that really perturbs me is instability. If something is broken, I can fix it; if it works, I can fix it 'til it's broke. :) But something that works sometimes, and other times doesn't, simply won't fly. I was able to introduce some stability by restarting the server 4 times a day, but that's a band-aid, not a long term solution. I was tired of fighting.
|
||||
|
||||
**Bottom line**: the configuration required for a stable server is in opposition to a lean-and-mean configuration. So, I installed the required Apache modules, and will continue to run my PHP-serving server at a configuration twice as large as it needs to be. I'll eventually move the Mono (.NET) processes to another machine, where the fast configuration won't cause stability problems.
|
||||
|
||||
But, PHP isn't all. While I would still heartily recommend BlogEngine.NET to someone who was going to serve the blog from a Windows machine, but I had some issues getting upgrades to go smoothly under Mono. It also is optimized for fast serving, at the expense of RAM. At this point, that's not the tradeoff we need.
|
||||
|
||||
Finally, with this update, the blog has received its first new theme. It's a clean, clear theme that should serve the content well. Plus, the social media icons up in the corner are just too cool, IMO. I've also applied tags to all posts except the "My Linux Adventure" series, and this theme displays them. (Comments are not here now, but will be migrated shortly.)
|
||||
|
||||
So, there you have it. Enjoy!
|
||||
|
||||
|
||||
[Tech Blog 2.0]: /2010/tech-blog-2-0.html "Tech Blog 2.0 • DJS Consulting Tech Blog"
|
||||
[WordPress]: //wordpress.org "WordPress"
|
||||
[BlogEngine]: //dotnetblogengine.net "BlogEngine.NET"
|
||||
29
source/_posts/2011/xine-lib-1-1-20-rpm.md
Normal file
29
source/_posts/2011/xine-lib-1-1-20-rpm.md
Normal file
@@ -0,0 +1,29 @@
|
||||
---
|
||||
layout: post
|
||||
title: xine-lib 1.1.20 RPM
|
||||
author: Daniel
|
||||
date: 2011-11-13 20:20:16
|
||||
categories:
|
||||
- [ Hosted 64-bit Software, xine RPMs ]
|
||||
tags:
|
||||
- rpm
|
||||
- xine-lib
|
||||
---
|
||||
|
||||
Below are the library and development RPMs for xine-lib version 1.1.20. These were built on Ubuntu Linux and converted to RPM using alien. Be sure to check out the [About the xine RPMs][abt] post for more information.
|
||||
|
||||
[xine-lib][] - The main xine library
|
||||
[xine-lib-dev][] - The development xine library (needed if you're building an interface against xine-lib)
|
||||
[xine-lib-doc][] - Documentation
|
||||
|
||||
You'll also need a user interface - as of this release, the most current release of [xine-ui is 0.99.6][ui].
|
||||
|
||||
(To save disk space, only the current release and two [prior releases][pri] will be maintained.)
|
||||
|
||||
|
||||
[abt]: /2005/about-the-xine-rpms.html "About the xine RPMs • DJS Consulting Tech Blog"
|
||||
[xine-lib]: //hosted.djs-consulting.com/software/xine/xine-lib/libxine1-1.1.20-2.x86_64.rpm
|
||||
[xine-lib-dev]: //hosted.djs-consulting.com/software/xine/xine-lib/libxine-dev-1.1.20-2.x86_64.rpm
|
||||
[xine-lib-doc]: //hosted.djs-consulting.com/software/xine/xine-lib/libxine1-doc-1.1.20-2.noarch.rpm
|
||||
[ui]: /2010/xine-ui-0-99-6-rpm.html
|
||||
[pri]: /2010/xine-lib-1-1-19-rpm.html
|
||||
23
source/_posts/2011/your-mothers-maiden-name-is-useless.md
Normal file
23
source/_posts/2011/your-mothers-maiden-name-is-useless.md
Normal file
@@ -0,0 +1,23 @@
|
||||
---
|
||||
layout: post
|
||||
title: Your Mother's Maiden Name Is Useless
|
||||
author: Daniel
|
||||
date: 2011-10-04 18:10:36
|
||||
categories:
|
||||
- Security and Privacy
|
||||
tags:
|
||||
- answer
|
||||
- facebook
|
||||
- maiden
|
||||
- question
|
||||
- security
|
||||
summary: With the advent of social media, be smart about your security questions and answers
|
||||
---
|
||||
|
||||
...well, at least as a security question.
|
||||
|
||||
This is not a new thing, and is the reason that most places allow you to define security questions other than that. With the prevalence of information available online, it really is not much of a stretch for a would-be attacker to determine; if you are connected to your mother via a social network like Facebook, where having a public maiden name is encouraged to help you be found, it becomes trivial.
|
||||
|
||||
If you still have "mother's maiden name" as a security question somewhere, there's no need to panic. There are two simple options. You can see if there is another question you can use in its place, and just use that one. If you can't (or don't want to) do that, <del>lie</del> make something up; there is no requirement that the answer is accurate, only that you can match the answer when challenged. What you should **not** do is demand that your mother remove that information from her profile. This is unnecessary, as the information has already been released; plus, "security through obscurity" is of limited benefit.
|
||||
|
||||
Just a quick tip to help keep you secure online...
|
||||
Reference in New Issue
Block a user