How Do I Think Logically When Programming?

Upload and start working with your PDF documents.
No downloads required

How To Write on PDF Online?

Upload & Edit Your PDF Document
Save, Download, Print, and Share
Sign & Make It Legally Binding

Easy-to-use PDF software

review-platform review-platform review-platform review-platform review-platform

How do I think logically when programming? I have folders that contain mp4, text, pdf, doc, mp3 files and I would like to separate them. I can write Ruby code, but it’s the logic that kills me. I've worked on this problem for 3 weeks.

I think you have a good start, but you have to remember that computers are idiots. Think about giving these directions to an idiot and imagine what will happen. Try to follow your own steps by hand. If you need to keep track of something in a variable, specify the variable name so you can use it later. Think about what kinds of things could go wrong, and what you would do if that happened. Ask the user where to look for files. (What can go wrong here? Can t specify a directory like your root directory? Are there any kinds of files in the directory that you're going to disallow?) Sort by file extension. (Sort what? From where? Just specify a little more. You don't really want to sort, though, you want to group. Should .PDF and .pdf be considered the same? (If you're on a Windows system, t'd probably better be. If you're on Unix, maybe not.) Are there things that can go wrong here?) Ask where to save. (What can go wrong here?) Display organized folders. (It sounds to me like you missed a step. Your idiot who gets the directions asked where to save, because you told him to. There are no organized folders. Why would there be when you haven't done anything with the files? What is it you're doing with the files? Moving them? Copying them? Again, what can go wrong here? What if the folders already exist? What if the files already exist? Should the folder t're copying to already exist or not? What should the target directories be named? If *.mp3 files should go in the mp3 folder, what did you decide about PDF vs. pdf?)

PDF documents can be cumbersome to edit, especially when you need to change the text or sign a form. However, working with PDFs is made beyond-easy and highly productive with the right tool.

How to Write On PDF with minimal effort on your side:

  1. Add the document you want to edit — choose any convenient way to do so.
  2. Type, replace, or delete text anywhere in your PDF.
  3. Improve your text’s clarity by annotating it: add sticky notes, comments, or text blogs; black out or highlight the text.
  4. Add fillable fields (name, date, signature, formulas, etc.) to collect information or signatures from the receiving parties quickly.
  5. Assign each field to a specific recipient and set the filling order as you Write On PDF.
  6. Prevent third parties from claiming credit for your document by adding a watermark.
  7. Password-protect your PDF with sensitive information.
  8. Notarize documents online or submit your reports.
  9. Save the completed document in any format you need.

The solution offers a vast space for experiments. Give it a try now and see for yourself. Write On PDF with ease and take advantage of the whole suite of editing features.

Customers love our service for intuitive functionality



46 votes

Write on PDF: All You Need to Know

What is the goal of this task? (If you had a complete understanding of this section, you would have no problem answering this question. Just pick one. It could be as trivial as “Sort and save files”. You're the idiot answering to, so you might as well pick something easy.) Tell the user how it works. (If you didn't get this question right, then you know that you can get some pretty bad answers in this section.) When you think you're ready, say that the task is complete. (If no tasks are completed in this tutorial, just go write some more for now.) Let's go back to this file list. The next step is to get this list, from which we can look through the files you created. Ask the user where he or she can find this list. (What do I mean by this? You did the wrong thing.