2

Quick question about something I've ran into alot recently:

So many times I'm looking for information from blogs, and find really interesting and helpful examples, only to discover the blog author has shown the code as an image..

With no cut-and-paste available, how does everyone handle this? Find the code elsewhere or type it all out?

finoutlook
  • 2,523
  • 5
  • 29
  • 43
  • 2
    Personally, I paste the image into some OCR program to extract most of it. In my note taking proram there is a built in OCR functionallity, so I just paste the image into it, right click and choose copy text. It is still inconvinient becuase it tends to screw l and i's, but it's better than nothing – Barak Itkin Sep 22 '11 at 10:04
  • I suppose for a lengthy bit of code, OCR is the way to go. Typing it out just seems wrong. – finoutlook Sep 22 '11 at 10:11
  • I should mention I'm not talking about 'fun' code in blog headers etc. `me + blog == cool` and all that stuff people do. Google can leave the rankings for those : ) – finoutlook Sep 22 '11 at 10:12
  • OCR looks like a good solution for this problem, when code samples are lengthy. However I'd have to agree with Peter Kelly that maybe this isn't an issue at all, and typing the code out will help more in the long run! – finoutlook Sep 22 '11 at 10:44

3 Answers3

3

use an OCR?

Here is a list of OCR software

ToOsIK
  • 643
  • 2
  • 8
  • 18
  • Thanks, you got in first with the OCR suggestion (aside from Lightning's comment above). I'll try it out on some code I need to get from an image. – finoutlook Sep 22 '11 at 10:46
3

Personally I don't really learn anything from just cutting and pasting so writing something out by hand is more beneficial. Also, code on blogs is rarely production quality anyway so you'll need often need to improve it with error handling, refactor names etc. so you're going to be changing it anyway - might as well write it out!

Peter Kelly
  • 14,253
  • 6
  • 54
  • 63
  • Good point. Typing it out gives you the intellisense suggestions too so you can see the other method options etc as you go. – finoutlook Sep 22 '11 at 10:14
2

Maybe a quick ocr service can save the situation... http://www.free-ocr.com/ (only for example)

PengOne
  • 48,188
  • 17
  • 130
  • 149
Kouan
  • 21
  • 1