Enable contrast version

Tutor profile: Steve M.

Inactive
Steve M.
Software Architect with 15+ years experience
Tutor Satisfaction Guarantee

Questions

Subject: Databases

TutorMe
Question:

What is the difference between an inline query or a parameterized query (aka prepared statements)? How does one query visibly look different than the other? How is this different from stored procedures (aka stored routines)?

Inactive
Steve M.
Answer:

Both inline and parameterized queries execute the SQL against the database. The difference is that inline statements will (frequently) use string concatenation to introduce variables; where parameterized queries will use strongly typed object replacement for variables. The effect is that variables are treated as "code" with inline statements (allowing potential injection attacks), but parameterized queries treat the variable strictly as data. A stored procedure is a compiled SQL statement, which could contain one-to-many SQL statements, and any of them could allow for inline SQL and/or parameterized SQL.

Subject: Computer Science (General)

TutorMe
Question:

How would you explain the difference between an interface and an abstract class? Do they share any similarities?

Inactive
Steve M.
Answer:

An interface is simply a declaration of the methods, functions, and properties that are expected to be available. There is no functional code present. An abstract class, however, *could* contain functional code. Interfaces do not specify the accessibility (encapsulation) of methods, functions, and properties. However, abstract classes can indicate accessibility of methods/functions/properties. Both concepts require a class to implement/inherit from those concepts to be useful.

Subject: C Sharp Programming

TutorMe
Question:

The "using" keyword is powerful for reducing lines of code and calling "Dispose" before exiting it's block. What is another way of writing a "using" statement? Can you think of case where you would want to do the alternate implementation instead of the "using" block?

Inactive
Steve M.
Answer:

The alternate implementation is "try-finally", where "catch" is ignored. A case where you would not want to use a "using" block is where you could have specific exceptions to "catch" and act upon for exiting out. One example would be database communication for large dataset interactions, where you may need to rollback some initial data commits. Another example would be TCP communication, where endpoints could fail and leave stale open connections for an extended period of time (before GC or other cleanup happens).

Contact tutor

Send a message explaining your
needs and Steve will reply soon.
Contact Steve

Request lesson

Ready now? Request a lesson.
Start Lesson

FAQs

What is a lesson?
A lesson is virtual lesson space on our platform where you and a tutor can communicate. You'll have the option to communicate using video/audio as well as text chat. You can also upload documents, edit papers in real time and use our cutting-edge virtual whiteboard.
How do I begin a lesson?
If the tutor is currently online, you can click the "Start Lesson" button above. If they are offline, you can always send them a message to schedule a lesson.
Who are TutorMe tutors?
Many of our tutors are current college students or recent graduates of top-tier universities like MIT, Harvard and USC. TutorMe has thousands of top-quality tutors available to work with you.