Wednesday, March 18, 2020

Essay on Psychology and Children

Essay on Psychology and Children Essay on Psychology and Children CU1520.4-Understand how working practises can impact on the development of children and young people. 1. Explain how own working practise can affect children and young people’s development As a practitioner it is our duty to observe and maintain the right procedures to ensure that the children are offered an exciting environment which will allow the best possibilities for development. So it can be stated that how we set up our own working practices can affect children and young people’s development. As, role models we need to practice good behavior methods for example, saying 'Please' and 'Thankyou' to the manner of our voice as we use to speak to one another. Children are able to sense any kind of atmosphere even when adults are speaking between each other. It is important to encourage children to understand the importance of good physical and mental health through their diet, exercise and healthy lifestyle. If we do not promote and encourage a healthy and balanced lifestyle, it could result in the children having poorly developed immune system which in turn would cause them to be ill and have days off school which would affect their development. Promoting good hygiene is very important. In my nursery we encourage hygiene throughout the day. We do this by washing the tweenies’ hands before meal times, we take them to the toilets to do this. As they have been doing this for a while they are used to the routine. They ask for the soap themselves and they know they have to dry their hands with the paper towels. Also when the children have eaten they wipe their hands and face with wet flannels, again as they are used to this idea most of the children ask themselves for the flannels when they have eaten. 2. Explain how institutions, agencies and services can affect children and young peoples development. Speech and language can help children overcome most of their problems. By helping children gain the ability to use language they can help children gain confidence and self-esteem I have seen this in my setting with children who have had communication and language needs. These children have gained confidence and their language is now at a level that they can interact with other children and not show frustration. This is because they can now express themselves. The Senco is in an educational setting that gives support to children and families with special need, this person is also responsible for identification of special needs. Other learning support staff work within and outside schools providing a range of services to help children who have certain specific educational needs. This might include people like teaching assistants or advisors to provide support and train staff. Also Youth justice are based on children with behavioural problems these people will work with them and social workers to help them. Social workers help vulnerable children and young people and their families this might include children on the child protection register or disabled children. A Psychologist is a professional who helps support children

Monday, March 2, 2020

Using Sinatra in Ruby - Introduction

Using Sinatra in Ruby - Introduction In the previous article in this series of articles, we talked about what Sinatra is. In this article, well look at some real functional Sinatra code, touching on a few Sinatra features, all of which will be explored in depth in upcoming articles in this series. Before you get started, youll have to go ahead and install Sinatra. Installing Sinatra is as easy as any other gem. Sinatra does have a few dependencies, but nothing major and you shouldnt have any problems installing it on any platform. $ gem install sinatra Hello, World! The Sinatra Hello world application is shockingly simple. Not including the require lines, shebang and whitespace, its just three lines. This is not just some small part of your application, like a controller in a Rails application, this is the entire thing. Another thing you may notice is that you didnt need to run anything like the Rails generator to generate an application. Just paste the following code into a new Ruby file and youre done. #!/usr/bin/env rubyrequire rubygemsrequire sinatraget / doHello, world!end Of course this isnt a very useful program, its just Hello world, but even more useful applications in Sinatra arent much larger. So, how do you run this tiny Web application? Some kind of complex script/server command? Nope, just run the file. Its just a Ruby program, run it! inatra$ ./hello.rb Sinatra/0.9.4 has taken the stage on 4567 for development with backup from Mongrel Not very exciting yet. Its started the server and bound to port 4567, so go ahead and point your Web browser to http://localhost:4567/. Theres your Hello world message. Web applications have never been so easy in Ruby before. Using Parameters So lets look at something a little more interesting. Lets make an application that greets you by name. To do this, well need to use a parameter. Parameters in Sinatra are like everything elsesimple and straightforward. #!/usr/bin/env rubyrequire rubygemsrequire sinatraget /hello/:name doHello #{params[:name]}!end Once youve made this change, youll need to restart the Sinatra application. Kill it with Ctrl-C and run it again. (Theres a way around this, but well look at that in a future article.) Now, the parameters are straightforward. Weve made an action called /hello/:name. This syntax is imitating what the URLs will look like, so go to http://localhost:4567/hello/Your Name to see it in action. The /hello portion matches that portion of the URL from the reqest you made, and :name will absorb any other text you give it and put it in the params hash under the key :name. Parameters are just that easy. There is of course much more you can do with these, including regexp-based parameters, but this is all youll need in almost every case. Adding HTML Finally, lets spiff this application up with a little bit of HTML. Sinatra will return whatever it gets from your URL handler to the web browser. So far, weve just been returning a string of text, but we can add some HTML in there with no problem. Well use ERB here, just like is used in Rails. There are other (arguably better) options, but this is perhaps the most familiar, as it comes with Ruby, and will do fine here. First, Sinatra will render a view called layout if one exists. This layout view should have a yield statement. This yield statement will capture the output of the specific view being rendered. This allows you to create layouts very simply. Finally, we have a hello view, which generates the actual hello message. This is the view that was rendered using the erb :hello method call. Youll notice that there are no seperate view files. There can be, but for such a small application, its best to keep all the code in a single file. Though the views are sepeated at the end of the file. #!/usr/bin/env rubyrequire rubygemsrequire sinatraget /hello/:name doname params[:name]erb :helloend__END__ layouthtmlbody% yield %/body/html helloh3Hello % name %!/h3 And there you have it. We have a complete, functional hello world application in about 15 lines of code including the views. The following articles, well take a closer look at the routes, how you can store and retrieve data, and how to do better views with HAML.