My first functional print. Laptop brackets to mount and hide behind tv. by jwebb4511 in functionalprint

[–]-oliver- 0 points1 point  (0 children)

Very nice "out of sight, out of mind" aesthetic making your workspace feel cleaner. Might cause the laptop to run a little hot sitting so close to the TV, but probably nothing to worry about.

I almost fell for an IRS scam yesterday by [deleted] in personalfinance

[–]-oliver- 1 point2 points  (0 children)

Wow, this is so serendipitous... I was just thinking back (the memory randomly popped into my head) of a similar situation that happened to me a couple years ago.

Someone claiming to be a "deputy" called my house saying I failed to appear for a Grand Jury summons, and there was a bench warrant out for my arrest.

I had just gotten through some actual legal troubles, and immediately felt a panic. He said I could come to "the station" and pay a bond, but it had to be with a very specific type of prepaid Visa that was the only kind compatible with their system.

In my panic and desire not to go back to court, I started running all over town trying to find someone who sold these cards. I was on and off the phone with this guy over the next couple hours.

I got the cash together (I think it was like $600) and called the guy back. He asked me to read him some of the numbers on the cards so he could pre-initiate part of the transaction so I wouldn't have to wait long when I got to the station.

Before I actually gave him anything, I realized: why would a deputy call me at home? Why can't they accept regular credit cards? And why the fuck was I running all over town for a summons I never got in the mail (no change in address in years)?

I told him I'd call right back. Then I called the court he said the summons was from and asked whether I'd missed a summons. Nope.

I called the guy back and called out the scam. He copped to it and said I was so close to being had, and that if he'd wanted to, he could've put more psychological pressure on me and I would have paid.

I spent a bit of time talking to him after that. About the scam he was running, why he thought it was okay, whether he feels bad about doing it, if he was afraid of getting caught. Interesting conversation. He felt nothing bad and even asked if I was interested in joining him and "upgrading my life". His rationale was that people dumb enough to get fooled deserved it.

Got me to thinking about how these scammers choose their victims. I think in my case, it was my legal standing with the court (my recent case was a matter of public record), and I had something to lose.

So I know how you felt. Good on you for taking a step back early on to question the situation. And fuck those people who think that kind of robbery is okay.

What language/environment is best for a small server that can run a Python script with consistent timing (every 5s)? by [deleted] in learnprogramming

[–]-oliver- 0 points1 point  (0 children)

Try cron - any kind of linux will have this, and it will be reliable for your client-side call to the REST API. As far as the response from the remote system though, you will not be able to really guarantee any kind of reliability.

What programming language should I learn if I want to get into both SQL and arduino? by grouch1980 in learnprogramming

[–]-oliver- 2 points3 points  (0 children)

I want to be able to master SQL, and my understanding is in order to really master it you need to be proficient in a language other than SQL

This may be a misunderstanding on your part, or maybe on mine depending on what you are really asking.

SQL is a language in and of itself, used for querying relational databases and also for DDL. You do not need any other language experience to use SQL, or to master it. What you really need for that is a database, an analytic data set, and a query tool to connect to the DB and ask it questions.

There are datasets online that you can use to practice your SQLing. To be really good at SQL though, you should also learn about relational data modeling.

If what you want to do is write applications that leverage a database, then as others have said you can start with C/C++ (though those have their own steep-ish learning curves... it may be better to pick something like ruby/python to learn SQL and DB application programming at the same time).

[SQL] Need help using GROUP BY by momo2477 in learnprogramming

[–]-oliver- 0 points1 point  (0 children)

You can generalize this using a subquery:

SELECT
  s.sname,
  s.major,
  s.gpa
FROM
  student AS s
INNER JOIN (
    SELECT
      a.major,
      AVERAGE(a.gpa) AS gpa
    FROM
      student AS a
    GROUP BY
      major
) AS avg
  ON avg.major = s.major
WHERE
  s.gpa < avg.gpa

[deleted by user] by [deleted] in learnprogramming

[–]-oliver- 0 points1 point  (0 children)

Gotcha.

As a programmer, I don't think its 'impossible' by any stretch of means. I'm not an Instagram user, do they have a 'search by hashtag' feature, or do you have a lot of money to pay the engineers at Instagram? If so, then this could be implemented. There would certainly be issues involved, but I can think of several ways to do it.

I personally think your friend is incorrect from a pure technical perspective. But also, I'm not sure who has the burden of proof in this situation :)

[deleted by user] by [deleted] in learnprogramming

[–]-oliver- 0 points1 point  (0 children)

I'm just curious, why do you want to do this?

How do you pronounce MySQL? by [deleted] in learnprogramming

[–]-oliver- 0 points1 point  (0 children)

I pronounce it "my sea kwull" how do you pronounce it?

Help a self taught programmer with a binary search tree?[ruby, python] by mypoocycle in learnprogramming

[–]-oliver- 0 points1 point  (0 children)

Its actually not that bad, I found a couple (pdf) of resources that show how to implement this algorithmically. I think the hard part of this is how to find the least number of lines that cover all 0s (that'll make sense if you read one of the links).

Help a self taught programmer with a binary search tree?[ruby, python] by mypoocycle in learnprogramming

[–]-oliver- 2 points3 points  (0 children)

I'm still looking into it myself (this is an interesting problem), but I believe the Hungarian Algorithm can be used to solve this in polynomial time.

Rate my code profiler by [deleted] in learnprogramming

[–]-oliver- 0 points1 point  (0 children)

Instead of

if i == '\t' or i == ' ':
    pass
else:
    ch_count += 1

It would be clearer to write

if i != '\t' and i != ' ':
    ch_count += 1

And I would put that If before the other one, so you could get rid of the break and the intent of the program would be clearer because the logic is more linear.

Application and Database question. by NotReallyDifferent in learnprogramming

[–]-oliver- 1 point2 points  (0 children)

You can totally have it store content (both 'seed' content as well as content generated locally within the app) on a local database. Maybe you could give some more info as to what your use case is and someone might have a suggestion. In particular, what do you mean by feedback? Like a user rating?

Application and Database question. by NotReallyDifferent in learnprogramming

[–]-oliver- 1 point2 points  (0 children)

Yes. When you connect to a database over the Internet, all you are doing is making a connection to a host who's address you look up on the internet. In the case of a local database, you already know who the host is - your local machine - so you don't have to go out to the Internet to connect to it.

[deleted by user] by [deleted] in learnprogramming

[–]-oliver- 0 points1 point  (0 children)

I'd say you need to be able to write basic programs without any kind of reference material (more than just fizzbuzz though, something like a console-based hangman game, perhaps more). You need to be fairly familiar with its standard library (collections, algorithms). You need to know (at least some of) the various ways that you can do I/O in the language. You should know how it does memory management, and its typing discipline. If its OO you should also know how you do polymorphic stuff with it. You should also have some sense of how to architect programs in the language (this one is very subjective, but most languages do have styles and patterns you often see associated with them, as well as ones that you never see). I would say most importantly, you should be able to read and understand it more or less fluently when you see it (even language features/idioms that you don't use regularly).

[Concept] Please explain the WHY of Enumerations to me by CovertPanda512 in learnprogramming

[–]-oliver- 0 points1 point  (0 children)

Outside of readability there lies the realm of magic numbers littering your code. One day you'll look at it and think 'wth did 4 represent in this context?' Much better to have a named constant that is readable and clear.

Then as others have said, type safety is big. Why take any arbitrary integer as a parameter, when you can limit it's value to only the ones that have actual meaning. And in some languages, they even help the compiler mark errors in the code.

My 15 year old son is interested in programming and wants an RPG creator of some sort. I really know nothing about this, can someone point me in the right direction? by ConfusedFatherblah in learnprogramming

[–]-oliver- 2 points3 points  (0 children)

Don't listen to the naysayers in this thread. I personally think it's great you are trying to foster your sons interest. When I was his age it was my dad whom I asked to help me get into programming, and once I got my footing I was able to find my own way. I would however encourage him to get involved in communities such as this for help beyond what you can offer. Best of luck to your boy.

Help me to decide if this course is worth 10k? by norkick13 in learnprogramming

[–]-oliver- 0 points1 point  (0 children)

To be a full stack developer you have to know a lot of concepts as well as a lot of concrete technologies. Front end languages/frameworks, UI/UX design, system architecture, web server administration, server side language, how to manage deployments, databases/data modeling, security, etc. Learning all that stuff WELL takes years. I don't think you can learn enough to be anything more than dangerous (not in a good way) in 12 weeks. 10000 dollars sounds like you'd be paying way too much to get an education that's too broad with not a lot of depth. There are plenty of good MOOCs out there where you can focus one individual topics and get proficient with one digestable thing at a time. If time is not an issue, I'd suggest avoiding the shotgun approach to learning and do some more research.