What I did learn was how to create systems that make passing the class quicker and easier using both paper and software systems. I DID NOT SAY CHEATING! . . . I am taking college algebra in the spring, (I have saved the hardest classes for last.) and found a program that seems to be able to do 95% of the algebra problems with probably 95% accuracy--and the mess-ups are so messed up that its easy to tell--this might be helpful to me if I am struggling to find the answer.
I would recommend not becoming too dependent on an automated solver to do your work, as you won't have the luxury of using that program on a test. In the worst case, you might find it useful for checking problems you've already solved, but you should focus on mastering the material in your class even if you can figure out ways to avoid it.
I don't know how it works-- maybe they have someone on the other end typing the answer as you submit it.
Probably not. Automated solvers like the one you describe parse input into an abstract expression tree, and use pattern matching to manipulate the structure of the tree according to well-defined rules and invariants. Computer scientists usually call this
symbolic processing. Here's a
symbolic derivative calculator in Haskell.
You can implement an automated solver in C and Java, but I would recommend using languages with strong pattern matching facilities like Haskell, SML/OCaml, F#, Scala, Prolog, or Scheme.
The only problem is the C and Java class. Is there any shortcuts that you can use to get you through any of the above classes that you know of. Or are Jrefers not the lazy shortcut type of peeps.
Depends on your use case, but here are some things I do to make my job easier:
Regex away repetitive bits of code
Let's say I want to perform a field-by-field comparison of two objects (without using reflection/introspection), but I have something like 50 fields:
Code:
// SomeClass.cs
public class MyObject {
public string A { get; set; }
public string B { get; set; }
public string C { get; set; }
public string D { get; set; }
public string E { get; set; }
public string F { get; set; }
public string G { get; set; }
// . . .
public string Z { get; set; }
}
I will copy the properties from my class definition over to
a regex testing tool, write a quick regex:
Code:
# pattern
^\s*public string (\S+) \{ get; set; \}
# replace
Assert.AreEqual(expected.$1, actual.$1);
The regex will extract the relevant bits of code I want, and the replace will reformat it for me. I've written some insane bits of regex to format things into comma separated lists, sql statements, and entire methods.
Script out complex tasks
I fall back on throw-away scripts whenever I need something beefier than regex.
For example, I recently moved one of our applications from Linq2Sql to EntityFramework. Although I used a tool to autogenerate entity framework models and mapping files, the tool did not generate code to invoke our stored procs.
I threw together a quick C# app which queries our database for all of the stored procedures, gets all of the parameters, and generates the requisite C# code needed to invoke the stored procs through Entity Framework. It took a little over an hour or so to write the script and format the the output
exactly the way I wanted, but it saved about 40 hrs of manual effort.
Autohotkey away repetitive clicks and keystrokes
I use
Autohotkey for automating repetitive tasks, such as filling in fields on a form, performing a series of repetitive clicks, running batch files, etc.
One of my favorite AHK scripts automated a very repetitive task for me:
- click a button to show some debug information in XML format
- copy XML to the clipboard
- open Notepad++
- paste the XML into a new document
- simulate the keystrokes to turn on XML syntax highlighting
- simulate keyboard strokes to automagically format the XML
After scripting out those steps, I saved huge amounts of time and, more importantly, eliminated a tremendous amount of repetitive strain on my arms and wrists.