T-SQL query practice/exams/tuning examples - tsql

Can the community suggest some T-SQL practice/sample exams, and tips on increasing performance/tuning? This is for preparing interview. Thanks.

T-SQL 'exams' are tough to come by. There are a lot of concepts that you can't really grasp until you've used them (and usually after some very painful hours working on "weird" issues).
Depending on how advanced you're looking to get, if you'd like to really go nuts and see what you're capable of, look at http://beyondrelational.com/tc/ There are challenges that people compete in. If you're looking for more of a try/learn approach, do an older challenge and peek at the answer if you can't quite figure it out.
Actually, looking at the page now I see that they have beginner challenges as well.

An SO search for interview+questions+sql
To be brutal, you can't learn answers to questions they may ask. Either you know or you don't. It's easily spotted if they hire consultants too (I was interviewed by a famous MS bloke once, had a book or 2 of his on my desk) because they don't yet have in house skills.

Related

What Is The Best Order To Learn Beginner To Advanced Flutter Material?

I'm in the process of learning to become a better Flutter developer. I've taken a couple of intro courses on Udemy, and I've even built/released my first app.
While building my app, I realized I don't understand architecture.
My ultimate goal is to learn how to build apps as a professional developer would.
In the countless hours of research I've done, I've realized that professional developers:
Separate code into layers (ie. Presentation, Domain, Data)
Write their own tests
Likely a list of other things I don't know yet
understand.
While trying to learn these materials, I continually face the same problem. Every time I try to learn something new, I encounter something I don't understand.
For example, I might be trying to learn an architectural pattern, and out of the blue, I read terms like "dependency injection," "lazy singleton," or "repository." Because I have no idea what those things are, I get stuck.
I've tried to dig into the source code of professional apps, but it's way over my head. There's a massive gap between "I finished a couple of Udemy courses" and "I work as a senior engineer."
So, if you're an advanced developer, I have three questions.
If you had to teach a complete beginner to become a professional flutter developer, what material would you have them learn?
What reputable resources would you use to teach each topic?
In what order would you teach the material—to ensure the student could understand each new topic?
I know this is a broad question, so I'll narrow the scope. Ideally, I want to build apps like the team at Very Good Ventures does. For context, they use flutter_bloc, a Presentation, Domain, and Data type architecture (see picture), and write their own tests. And, as I mentioned above, likely a list of other things I don't yet understand :)
Architecture Pattern
Finally, I know I probably sound lazy. I certainly could read a million articles in an attempt to piece everything together. But, ideally, I was hoping to find a more effective path. So, that's why I'm asking the experts.
Thank you for your time,
Chris
I would suggest using GPT3 and codex. Give them all of the context you have, and ask your question. They have already read all of those articles plus looked at a lot of code. Because flutter is so new probably it is likely less represented in the data sets. However, I have been able to ask some forter questions and receive answers.
Flutter can be best thought by flutter's creators, no other resources can teach you better,
Just follow flutter official documentation,
All the examples are carefully designed with best coding practices and patterns,
https://docs.flutter.dev/

Need help: Forum for Receiver Design queries

As much as I love this forum for my programming related questions, I am finding little or no help here. I am working on designing a Receiver for WLAN and have have lot of queries and I am looking for a forum where I can ask someone who are working in the same area.
I would be glad if you could suggest me where I can post my questions.
Thanks
For basic receiver design, you may want to have a look at our sister site, electronics.stackexchange. Also, Signal, Image & Video Processing might be of help once it gets off the ground.
Also, when you're working in a specific field with which programmers in general are not very familiar, you have to explain your questions very well in terms that everybody understands. To give you an example:
In 802.11b, Barker Code is used for spreading.
is completely incomprehensible for me, and, sorry, I don't have the time to fire up Wikipedia and order textbooks from our library to teach myself the specifics of how WLANs work.

Is going for a BCS the right move for me?

I'm at a fork in the road. I need somebody to give me some advice from their personal journey in IT.
At the moment, I have a college diploma (2 years) in Computer Programmer, and about 2 years of professional experience in the field of software. I'm currently freelancing my programming skills to the public, and am enjoying a nice income, and the rewards of flexibly working on a variety of projects with different cool people.
I'm young (21 years old), passionate about software, technology, the internet, and also business. I know if I ever want to dwell deeper into the software industry, I might have a hard time doing so without a Bachelors in Computer Science.
On one side, I think I'm better off getting my BCS while I'm still young and malleable. Also, the thought of learning even more stuff in my field is really exciting to me. On the flip side, it means another 3-4 years of studying, and jeopardizing my chances of going on vacation and accumulating wealth for a long time.
Considering that I'm already pretty successful with my college diploma, do you think it's a good idea for me to go get my BCS? Will it open up many more doors in the future?
I know if I ever want to dwell deeper into the software industry, I might have a hard time doing so without a Bachelors in Computer Science.
I completely disagree with this statement. If you want to "dwell deeper into the software industry", your drive, determination, and will to learn will be your limiting factors. I've known many CS Masters Degree candidates who, frankly, sucked. I've known CS majors who were very skilled and talented. I've known English majors who were excellent developers. The distinguishing factor between those that could and those that could not was a desire to learn.
I once thought that I needed a degree, but ultimately found it to be a distraction. I even wrote about it here: http://jasonleveille.com/blog/2009/10/the-cs-masters-degree-distraction. I don't know if a degree is or isn't right for you. You have to make that decision. Good luck figuring it out.
As far as helping your resume for getting a good job... I consider my stackoverflow profile about as powerful as my education background from one of the top universities in Canada. Just a thought.
I do think a diploma will help you though in 2 main ways:
In learning ability/thought discipline
As Resume flair for getting jobs
But experience is king for many companies. Personally if I was in your shoes I'd probably continue to do some contract work and take a class or two at a time.
If you have the will now though, and the money, and the time, go for the education full time and take on some projects part time. You may not be as flexible in the future.
My journey is a bit different from yours as I did my Bachelor's straight out of high school. I graduated with a high enough average to get a few scholarships and ended up with CS as one of my majors and Combinatorics & Optimization as my other one. I graduated in 1997 and this was about the time of the dot-com boom so while it did take a few months I did eventually get a job.
Could some of your college credits count towards a Bachelor's degree? Have you considered seeing if there is a Bachelor of Information Systems that may suit you better than a general CS program? Those are a couple of questions that I'd put out there as I'd likely think the key is finding that program that works for you is the key point I'd have as while some places may have that Bachelor's degree as a requirement, there will likely be places that wouldn't have that as a requirement so I kind of second Jason's reply on that point.

Encouraging good development practices for non-professional programmers? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 7 years ago.
Improve this question
In my copious free time, I collaborate with a number of scientists (mostly biologists) who develop software, databases, and other tools related to the work they do.
Generally these projects are built on a one-off basis, used in-house, and eventually someone decides "oh, this could be useful to other people," so they release a binary or slap a PHP interface onto it and shove it onto the web. However, they typically can't be bothered to make their source code or dumps of their databases available for other developers, so in practice, these projects usually die when the project for which the code was written comes to an end or loses funding. A few months (or years) later, some other lab has a need for the same kind of tool, they have to repeat the work that the first lab did, that project eventually dies, lather, rinse, repeat.
Does anyone have any suggestions for how to persuade people whose primary job isn't programming that it's of benefit to their community for them to be more open with the tools they've built?
Similarly, any advice on how to communicate the idea that version control, bug tracking, refactoring, automated tests, continuous integration and other common practices we professional developers take for granted are good ideas worth spending time on?
Unfortunately, a lot of scientists seem to hold the opinion that programming is a dull, make-work necessary evil and that their research is much more important, not realising that these days, software development is part of scientific research, and if the community as a whole were to raise the bar for development standards, everyone would benefit.
Have you ever been in a situation like this? What worked for you?
Software Carpentry sounds like a match for your request:
Overview
Many scientists and engineers spend
much of their lives programming, but
only a handful have ever been taught
how to do this well. As a result, they
spend their time wrestling with
software, instead of doing research,
but have no idea how reliable or
efficient their programs are.
This course is an intensive
introduction to basic software
development practices for scientists
and engineers that can reduce the time
they spend programming by 20-25%. All
of the material is open source: it may
be used freely by anyone for
educational or commercial purposes,
and research groups in academia and
industry are actively encouraged to
adapt it to their needs.
Let me preface this by saying that I'm a bioinformatician, so I see the things you're talking about all the time. There's some truth to the fact that many of these people are biologists-turned-coders who just don't have the exposure to best practices.
That said, the core problem isn't that these people don't know about good practices, or don't care. The problem is that there is no incentive for them to spend more time learning software engineering, or to clean up their code and release it.
In an academic research setting, your reputation (and thus your future job prospects) depends almost entirely on the number and quality of publications that you've contributed to. Publications on methods or new algorithms are not given as much respect as those that report new biological findings. So after I do a quick analysis of a dataset, there's very little incentive for me to spend lots of time cleaning up my code and releasing it, when I could be moving on to the next dataset and making more biological discoveries.
I'll also note that the availability of funding for computational development is orders of magnitude less than that available for doing the biology. In a climate where only 10% of submitted grants are getting funded, scientists don't have the luxury of taking time to clean and release their code, when doing so doesn't help them keep their lab funded.
So, there's the problem in a nutshell. As a bioinformatician, I think it's perverse and often frustrating.
That said, there is hope for the future. With second-and-third generation sequencing, in particular, biology is moving into the realm of high-throughput discovery, where data mining and solid computational pipelines become integral to the success of the science. As that happens, you'll see more and more funding for computational projects, and more and more real software engineering happening.
It's not exactly simple, but demonstration by example would probably drive the point home most effectively - find a task the researcher needs done, find someone who did take the time to make a tool w/source available, and point out how much time the researcher could save as a result due to having that tool available - then point out that they could give back to the community in the same fashion.
In effect, what you are asking them to do is become professional developers (with their copious free time), in addition to their chosen profession. Their reluctance is understandable.
Does anyone have any suggestions for how to persuade people whose primary job isn't programming that it's of benefit to their community for them to be more open with the tools they've built?
Give up. Seriously, this is like teaching a pig to sing. (I can say this because I used to be a physicist so I know what they're like.)
The real issue is that your colleagues are rewarded for scientific output measured in publications, not software. It's hard enough in computer science to get recognized for building software; in the other sciences, it's nearly impossible.
You can't sell good development practice to your biology friends on the grounds that "it's good for you." They're going to ask "should I invest effort in learning about good software practice, or should I invest the same effort to publish another biology paper?" No contest.
Maybe framing it in terms of academic/intellectual responsibility would help, to a degree - sharing your source is, in many ways, like properly citing your sources or detailing your research methodology. There are similar arguments to be made for some of the "professional software developer" behaviors you'd like to encourage, though I think releasing the code is probably an easier sell on these grounds than other things which could require significantly more work.
Actually, asking any busy project team to include in their schedule time for making their software suitable for adoption by another team is extremely hard in my experience.
Doing extra work for the public good is a big ask.
I've seen a common pattern of "harvesting" after the project is complete, reflecting that immediate coding for reuse tends to get lost in the urgency of the day.
The only avenue I can think of is if the reuse is within an organisation with a budget for a "hunter gatherer", someone whose reason for being there is IT.
You may be on more of a win for things such as unit tests because they have immediate payback for the development.
For one thing, could we please stop teaching biologists Perl? Teaching non-professional programmers a write-only language is practically guaranteed to lead to unmaintainable, throw-away code. Python fills the same niche, is just as easy to learn (it's even used to teach kids programming!), and is much more readable.
Draw parallels with statistics. Stats is a crucial part of scientific research, and one where the only sensible advice is: either learn to do it properly, or get an expert to do it for you. Incorrectly-done stats can completely undermine a paper, just as badly-written code can completely undermine a public database or web resource.
PS: This blog is very good, but getting them to read it will be an uphill struggle: Programming for Scientists
Chris,
I agree with you to a degree, but in my experience what ends up happening is that in their eagerness to publish you end up with too many "me too" codes and methods, which don't really add to the quality of science. If there was a little more thought about open sourcing code and encouraging others to contribute (without necessarily getting publications out of it) then everyone would benefit.
Definitely agree that a separation between the scientific programmers and the software engineers is a good thing, especially for production applications. But even for scientific programming, the quality of my code would have been so much better if I had followed good practices at the time.
In my experience the best way of getting people to program cleanly is to show a good example when you're working with them.
eg: "I never spend hopeless days debugging my code because the first things I code are automated unit tests that will pinpoint problems when they are small and easily detectable"
or: "I'm very bad at keeping track of versions of things, but sometimes my new code does break what did work before. So I use svn/git/dropbox to keep track of things for me"
In my experience that kind of statement can raise the interest of "biologists that learned how to script".
And if you need to collaborate on a bigger project, make it clear that you have more experience and that everything will go more smoothly if things are done your way.
Regarding publication of code, current practice is indeed frustrating. I would like to see a new journal like Source Code for Biology and Medecine, where code is peer-reviewed and can be published, but that has no (or very low) publication costs. Putting code on sourceforge or others is indeed not "scientifically worth it" because it doesn't make a line on your publication list, and most code is not revolutionary enough to warrant paying $1,000 for publication in Source Code for Biology and Medecine or PLoS One...
You could have them use a content management system, like Joomla. That way they only push content and not code.
I wouldn't so much persuade as I would streamline the process. Document it clearly, make video tutorials and bundle some kind of tool chain that makes it ridiculously easy to get source repositories set up without requiring them to become experts in something that isn't their main field.
Take a really good programmer who already knows best practices, ask your scientists to teach him what they need and what they do, eventually the programmer will have minimum domain knowledge (I suspect it takes between 1 and 3 years depending on the domain) to do what scientists asks for.
Developers always learn another domain of competency, because most of their programs are not for developers, so they need to know what the "client" do.
To be devil's advocate, is teaching scientists to be good software engineers the right thing to do? Software in research is usually very purpose specific - sometimes to the point where a piece of code needs to run successfully only once on a single data set. The results then feed into a publication and the goal is met. And there's a high risk that your technique or algorithm will be superseded by a better one in short order. So, there's a real risk that effort spent producing sparkling code will be wasted.
When you're frustrated by wading through a swamp of ill-formed perl code, just think that the code you're looking at is one of the rare survivors. Mountains of such code has been written, used a few times, then discarded never to see the light of day again.
I guess I'm just saying there's a big place in research for smelly heinous one-off prototype code. There are good reasons why such code exists. It may not be pretty, but if it gets the job done, who cares? We can always hire a software engineer to write the production-ready version later, IF it turns out to be justified, and let our scientists move on.

What methods do programmers prefer to use when learning new subjects or technologies

When you are learning a new subject or technology what ways do you use to remember your achievements ?
In the past I have used a variety of methods including some of the following :-
Paper-based Journal (A4 paper cut in half with a guillotine, and bound with a plastic spine.) I keep this chronologically, and frequently reorder the pages to group continuations or similar pages together.
Emails - I frequently email snippets of code to myself
Test programs - Short self-contained snippets of project code.
ProtoPage.com - web based repository of notes.
Memory - frequently the least reliable method, but occasionally it's better.
Finally :-
Stack overflow - I previously asked a question on here as I was working on the solution. Then came back to provide my own answer. Is this an acceptable use of Stack overflow ? Banging in questions as I think of them, and then coming back to provide an answer an hour, few hours, or maybe days later whn I've worked through it. Maybe coming back in the meantime to see what answers I'm getting, maybe providing me with new directions to try.
I was tempted to create a blog where I can store all these kinds of voyages of discovery I have but I think there may be greater value putting it on here.
Thoughts, opinions, and your methodologies girls and guys please.
If you build a core library for all your applications, you can use that for reference/commenting etc. You dont need to remember the full implementation of code, you just need to rememeber a reference to where it is (which is naturally/structurally categories by your code)
The thing is a Blog is exactly the means to achieve what you are wanting to. Its an online reference, allows for collaboration and you won't get shot to pieces when you post "random" questions on SO all day long, and answer them in a week when you find the answers.
SO is basically Q&A whereas a blog is a running counter of your problems and solutions to your coding problems.
It doesn't hurt either, can get some nice recognition from your blog, and gain yourself some reputation/followers in a community.