[erlang-questions] Still looking for an Erlang Job (please readme)

Ivan Carmenates García co7eb@REDACTED
Wed Aug 21 18:15:04 CEST 2013


Hi all,

I’m still looking for a job in the community, because I like Erlang and I
need to work. I have been trying signing in the Erlang jobs websites but I
have no luck since I’m from Cuba, but I think that shouldn’t be a problem,
but still I have no luck in finding Erlang jobs, not even one of it, I just
want one to be my first. I just need the opportunity to learn more Erlang
and to demonstrate my intelligence, I think I’m not so bad comparing my code
with your written in the Erlang OTP Libraries. Down is one example of the
code I’m writing right now. Sorry if bother you, I don’t look for any
trouble just a little bit of help and if you think I don’t deserve then I
will have no question back.

 

%%

%% %CopyrightBegin%

%%

%% Copyright X Software Corporation 2014. All Rights Reserved.

%% 

%% The contents of this file are subject to the Erlang Public License,

%% Version 1.1, (the "License"); you may not use this file except in

%% compliance with the License. You should have received a copy of the

%% Erlang Public License along with this software. If not, it can be

%% retrieved online at http://www.erlang.org/.

%% 

%% Software distributed under the License is distributed on an "AS IS"

%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See

%% the License for the specific language governing rights and limitations

%% under the License.

%%

%% %CopyrightEnd%

%%

 

%%%-------------------------------------------------------------------------
---

%%% @author Ivan Carmenates García

%%% @copyright X Software Corporation 2014

%%% @version 1.0

%%% @doc

%%% CountLink start point module.

%%%

%%% This module contains the basic functions to install, start, stop,
configure

%%% and update the CountLink System.

%%% @end

%%%-------------------------------------------------------------------------
---

 

%%% Module attributes definition.

-module(countlink).

-behavior(application).

-vsn(1.0).

-author("Ivan Carmenates García").

-description("CountLink start point module").

 

%%% Functions importing (module, [function/arity[, ...]]).

-import(error_logger, [info_msg/2]).

 

%%% Functions exporting ([function/arity[, ...]]).

-export([install_db/0, start_system/0, stop_system/0, start/2, stop/1]).

 

%%%-------------------------------------------------------------------------
---

%%% @doc

%%% Installs the CountLink System database.

%%% @end

%%%-------------------------------------------------------------------------
---

-spec install_db() -> ok | {error, Reason} when

    Reason :: term().

 

install_db() ->

    info_msg("   *** Application: \"~p\" is installing the database...~n",
[?MODULE]),

    timer:sleep(1000), % some nice waiting.

    %% Installs the CountLink System database.

    countlink_db:install().

 

%%%-------------------------------------------------------------------------
---

%%% @doc

%%% Starts the CountLink System.

%%% @end

%%%-------------------------------------------------------------------------
---

-spec start_system() -> ok | {error, Reason} when

    Reason :: term().

 

start_system() ->

    application:start(?MODULE).

 

%%%-------------------------------------------------------------------------
---

%%% @doc

%%% Stops the CountLink System.

%%% @end

%%%-------------------------------------------------------------------------
---

-spec stop_system() -> ok | {error, Reason} when

    Reason :: term().

 

stop_system() ->

    application:stop(?MODULE).

 

%%%-------------------------------------------------------------------------
---

%%% @doc

%%% Start point of the application.

%%%

%%% This function is automatically called when the application is started.

%%% @end

%%%-------------------------------------------------------------------------
---

-spec start(Type, StartArgs) -> Return when

    Type :: term(), % @see application module for start_type() type.

    StartArgs :: term(),

    Return :: {ok, pid()} | {ok, pid(), State} | {error, Reason},

        State :: term,

        Reason :: term().

 

start(Type, StartArgs) ->

    %% Starts the sasl application.

    %% TODO 1: put the sasl application start in the application
specification and

    %%         use application:ensure_all_started/1 instead of
application:start/1,

    %%         this require of the new Erlang version R16B04.

    application:start(sasl),

 

    %% Retrieves the node name.

    Node = erlang:atom_to_list(node()),

 

    %% Logs the application starting information.

    info_msg("   *** Application: \"~p\" is starting...~n"

             "       Type: ~p   StartArgs: ~p~n"

             "       NodeName: ~p~n", [?MODULE, Type, StartArgs, Node]),

 

    %% Tries to start the main supervisor.

    case countlink_sup:start_link(StartArgs) of

        {ok, Pid} ->

            {ok, Pid, ready};

        Error ->

            Error

    end.

 

%%%-------------------------------------------------------------------------
---

%%% @doc

%%% This function is automatically called when the application is stopped.

%%% @end

%%%-------------------------------------------------------------------------
---

-spec stop(State) -> void when

    State :: term().

 

stop(State) ->

    %% Logs the application stopping information.

    info_msg("   *** Application \"~p\" is stopped.~n"

             "       Current State: ~p~n", [?MODULE, State]),

    %% TODO 3: Do the necessary clean up and application stopping like sasl.

    void.

 

 

 

Best Regards,

Ivan

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20130821/fa21a6ad/attachment.htm>


More information about the erlang-questions mailing list