Archive

Archive for the ‘Q & A’ Category

Hackers vs audiophiles: which headphone do they prefer?

August 12, 2012 Leave a comment

Hackers vs audiophiles: which headphone do they prefer?.

Headphones for Hackers

– Anonymous Hacker

Headphones are ingrained in startup culture. If you visit a startup office, more often than not, it seems like everyone is wearing headphones. The same workplace norm doesn’t appear to exist at law firms, medical practices or anywhere else really.

A hacker needs to concentrate without interruption for long periods of time and yet has almost no quiet personal space at work. A pair of headphones is a great solution to the contradiction inherent in this situation.

Beyond the practicalities, hackers seem to be personally invested in their choice of headphones. Headphones are a tool of the trade, and like many craftsmen, programmers like to talk about their tools (what other professions could have lively debates about Text Editors?). Ask a programmer about his headphones and you’re likely receive a more detailed response than you care to hear.

At Priceonomics we became curious about what types of headphones programmers actually … (Read more here)

Advertisements

Zemanta Puts Unwanted HTML Comments In Pre-Formatted PHP Code (Sourcecode) In WordPress Posts

April 9, 2012 4 comments

PROBLEM:

I  have recently determined through trial and error and process of elimination that Zemanta is responsible for adding extraneous HTML comments to my pre-formatted (with “pre” tags) PHP code that I have placed between “sourcecode” tags to activate WordPress.com’s built in programming code syntax highlighting.

Here is a screenshot (fig 1.) that demonstrates the problem:

codeslayer2010 blog with zemanta extraneous html comment errors

fig. 1

See, all that green is what commented my code out and made it so it doesn’t display correctly.

I am not totally sure Zemanta is to blame, but it seems the most likely culprit.  Here’s why:

  1. Identified 3 possible suspects: Zemanta, WordPress.com proofreading, and pasting pre-formatted code in Visual view instead of HTML view.
  2. Disabled Zemanta and retested –  problem remained.
  3. With Zemanta disabled, disabled proofreading as well.  No change.
  4. With Zemanta and proofreading disabled, went Edit>HTML View.  In each instance where I had posted code, deleted all the code from in between “sourcecode” tags.
  5. Re-copied and pasted code from each original PHP file.  Re-tested: Worked!  Syntax highlighting works properly now.  Made multiple edits to both code and text, updated and viewed the post — Good to go every time.
  6. Re-enabled Zemanta, made a test edit, saved and previewed the new post.  Everything is messed up again!  This is why I think Zemanta is the issue.

SOLUTION:

The solution I have come up with is this.

  1. If you want to use Zemanta, do so before adding any preformatted code or sourcecode tags.  Always turn Zemanta off when you are done using it.
  2. DO NOT, (under any circumstances) have Zemanta enabled if you have preformatted PHP code in your blog.  Chances are, Zemanta will mess your code up and you will have to re-paste your code again.  During my tests, I have had to paste all my sourcecode from scratch 3 times and let me tell you — it gets very tedious and wastes valueable time.
  3. Always paste sourcecode in HTML view only.

These are my recommendations based on my personal experience with this issue.  I’d love to hear from anyone else who is having similar issues.  Please let me know if this solution worked for you!

– CodeSlayer2010

Q & A: How To Make Div’s With Rounded Corners In CSS?

Question:

How can I make boxes and div’s with rounded corners?

Answer:

CSS3 is the first version to have built-in rounded rectangle commands. The css property that addresses is this:

border-radius

It’s usage is:

border-radius: 15px;

Fairly simple and straight-forward; the higher the number the deeper the corner rounding.

If you have an older browser that does not support CSS3, then your only option is to pre-build the corners as images (gif or png for transparency) in Photoshop, Gimp, or some other graphic design program. After you have your corner(s) built, you would then use css to postion them around a rectangle button. There are many older tutorials that explain how to do this. Here is one

-Kristobaldude

Categories: .CodeSlayer's Posts, CSS, Q & A

Q & A: How To Schedule Publishing Of Multiple Posts in WordPress?

Hi folks,

I’ve been receiving some tech questions lately so I decided I’d start answering them on the blog so others can benefit as well.

Our next question is from Nadine in Houston, TX:

Question:

How do I schedule multiple posts in WordPress.com?  For instance, let’s say I want to make a queue or stack of posts, and the set up a rule that automatically publishes each post at certain intervals.  So, if I write 10 posts before going on vacation, I can set it up so that the next  one in the queue will publish itself to my blog every 3 days, or on some similar schedule.  I know you can schedule each post individually in WordPress.com by manually configuring the date on each post, but I’m looking for some automation to save time and do stuff in bulk.

Answer:

Great question Nadine.  Unfortunately, in WordPress.com you are only able to schedule posts one at a time.  On the other hand, if you self-host a WordPress.org-based blog then you have some more options.  One plugin that has high ratings is Editorial Calendar.  This gives you a calendar schedule view, you can schedule for multiple authors, drag and drop between days.  Overall, this one really gives you a lot of control options.  If you are hosting your own site, I’d say give it a try.

-Kristobaldude